HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux WebLive 5.15.0-79-generic #86-Ubuntu SMP Mon Jul 10 16:07:21 UTC 2023 x86_64
User: ubuntu (1000)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/html/wpbiancoarte/wp-content/plugins/qi-blocks/assets/dist/single-image.js
(()=>{var e={2:(e,t,l)=>{var a=l(4335)(Object.keys,Object);e.exports=a},80:(e,t,l)=>{var a=l(6025),n=Array.prototype.splice;e.exports=function(e){var t=this.__data__,l=a(t,e);return!(l<0)&&(l==t.length-1?t.pop():n.call(t,l,1),--this.size,!0)}},270:(e,t,l)=>{var a=l(7068),n=l(346);e.exports=function e(t,l,r,o,i){return t===l||(null==t||null==l||!n(t)&&!n(l)?t!=t&&l!=l:a(t,l,r,o,e,i))}},294:e=>{e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},346:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},689:(e,t,l)=>{var a=l(2),n=Object.prototype.hasOwnProperty;e.exports=function(e,t,l,r,o,i){var s=1&l,c=a(e),u=c.length;if(u!=a(t).length&&!s)return!1;for(var p=u;p--;){var m=c[p];if(!(s?m in t:n.call(t,m)))return!1}var b=i.get(e),d=i.get(t);if(b&&d)return b==t&&d==e;var g=!0;i.set(e,t),i.set(t,e);for(var f=s;++p<u;){var h=e[m=c[p]],k=t[m];if(r)var _=s?r(k,h,m,t,e,i):r(h,k,m,e,t,i);if(!(void 0===_?h===k||o(h,k,l,r,i):_)){g=!1;break}f||(f="constructor"==m)}if(g&&!f){var v=e.constructor,y=t.constructor;v==y||!("constructor"in e)||!("constructor"in t)||"function"==typeof v&&v instanceof v&&"function"==typeof y&&y instanceof y||(g=!1)}return i.delete(e),i.delete(t),g}},828:(e,t,l)=>{var a=l(7556);e.exports=function(e){return null==e?"":a(e)}},882:e=>{e.exports=function(e,t,l,a){var n=-1,r=null==e?0:e.length;for(a&&r&&(l=e[++n]);++n<r;)l=t(l,e[n],n,e);return l}},999:(e,t,l)=>{var a=l(9302),n=l(6800);e.exports=function(e){return a(function(t,l){var a=-1,r=l.length,o=r>1?l[r-1]:void 0,i=r>2?l[2]:void 0;for(o=e.length>3&&"function"==typeof o?(r--,o):void 0,i&&n(l[0],l[1],i)&&(o=r<3?void 0:o,r=1),t=Object(t);++a<r;){var s=l[a];s&&e(t,s,a,o)}return t})}},1020:(e,t,l)=>{"use strict";var a=l(6540),n=Symbol.for("react.element"),r=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,i=a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,l){var a,r={},c=null,u=null;for(a in void 0!==l&&(c=""+l),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)o.call(t,a)&&!s.hasOwnProperty(a)&&(r[a]=t[a]);if(e&&e.defaultProps)for(a in t=e.defaultProps)void 0===r[a]&&(r[a]=t[a]);return{$$typeof:n,type:e,key:c,ref:u,props:r,_owner:i.current}}t.jsx=c},1033:e=>{e.exports=function(e,t,l){switch(l.length){case 0:return e.call(t);case 1:return e.call(t,l[0]);case 2:return e.call(t,l[0],l[1]);case 3:return e.call(t,l[0],l[1],l[2])}return e.apply(t,l)}},1074:e=>{e.exports=function(e){return e.split("")}},1175:(e,t,l)=>{var a=l(6025);e.exports=function(e,t){var l=this.__data__,n=a(l,e);return n<0?(++this.size,l.push([e,t])):l[n][1]=t,this}},1331:(e,t,l)=>{var a=l(2552),n=l(8879),r=l(346),o=Function.prototype,i=Object.prototype,s=o.toString,c=i.hasOwnProperty,u=s.call(Object);e.exports=function(e){if(!r(e)||"[object Object]"!=a(e))return!1;var t=n(e);if(null===t)return!0;var l=c.call(t,"constructor")&&t.constructor;return"function"==typeof l&&l instanceof l&&s.call(l)==u}},1733:e=>{var t=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;e.exports=function(e){return e.match(t)||[]}},1791:(e,t,l)=>{var a=l(6547),n=l(3360);e.exports=function(e,t,l,r){var o=!l;l||(l={});for(var i=-1,s=t.length;++i<s;){var c=t[i],u=r?r(l[c],e[c],c,l,e):void 0;void 0===u&&(u=e[c]),o?n(l,c,u):a(l,c,u)}return l}},1882:(e,t,l)=>{var a=l(2552),n=l(3805);e.exports=function(e){if(!n(e))return!1;var t=a(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},1961:(e,t,l)=>{var a=l(9653);e.exports=function(e,t){var l=t?a(e.buffer):e.buffer;return new e.constructor(l,e.byteOffset,e.length)}},1986:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},2054:e=>{var t="\\ud800-\\udfff",l="["+t+"]",a="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",n="\\ud83c[\\udffb-\\udfff]",r="[^"+t+"]",o="(?:\\ud83c[\\udde6-\\uddff]){2}",i="[\\ud800-\\udbff][\\udc00-\\udfff]",s="(?:"+a+"|"+n+")"+"?",c="[\\ufe0e\\ufe0f]?",u=c+s+("(?:\\u200d(?:"+[r,o,i].join("|")+")"+c+s+")*"),p="(?:"+[r+a+"?",a,o,i,l].join("|")+")",m=RegExp(n+"(?="+n+")|"+p+u,"g");e.exports=function(e){return e.match(m)||[]}},2225:e=>{var t="\\ud800-\\udfff",l="\\u2700-\\u27bf",a="a-z\\xdf-\\xf6\\xf8-\\xff",n="A-Z\\xc0-\\xd6\\xd8-\\xde",r="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",o="["+r+"]",i="\\d+",s="["+l+"]",c="["+a+"]",u="[^"+t+r+i+l+a+n+"]",p="(?:\\ud83c[\\udde6-\\uddff]){2}",m="[\\ud800-\\udbff][\\udc00-\\udfff]",b="["+n+"]",d="(?:"+c+"|"+u+")",g="(?:"+b+"|"+u+")",f="(?:['’](?:d|ll|m|re|s|t|ve))?",h="(?:['’](?:D|LL|M|RE|S|T|VE))?",k="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",_="[\\ufe0e\\ufe0f]?",v=_+k+("(?:\\u200d(?:"+["[^"+t+"]",p,m].join("|")+")"+_+k+")*"),y="(?:"+[s,p,m].join("|")+")"+v,w=RegExp([b+"?"+c+"+"+f+"(?="+[o,b,"$"].join("|")+")",g+"+"+h+"(?="+[o,b+d,"$"].join("|")+")",b+"?"+d+"+"+f,b+"+"+h,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",i,y].join("|"),"g");e.exports=function(e){return e.match(w)||[]}},2404:(e,t,l)=>{var a=l(270);e.exports=function(e,t){return a(e,t)}},2428:e=>{e.exports=function(){return!1}},2507:(e,t,l)=>{var a=l(8754),n=l(9698),r=l(3912),o=l(3222);e.exports=function(e){return function(t){t=o(t);var l=n(t)?r(t):void 0,i=l?l[0]:t.charAt(0),s=l?a(l,1).join(""):t.slice(1);return i[e]()+s}}},2552:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},2824:(e,t,l)=>{var a=l(7805),n=l(3290),r=l(1961),o=l(3007),i=l(5529),s=l(2428),c=l(6449),u=l(3693),p=l(3656),m=l(1882),b=l(3805),d=l(1331),g=l(7167),f=l(4974),h=l(9884);e.exports=function(e,t,l,k,_,v,y){var w=f(e,l),A=f(t,l),S=y.get(A);if(S)a(e,l,S);else{var E=v?v(w,A,l+"",e,t,y):void 0,q=void 0===E;if(q){var I=c(A),x=!I&&p(A),C=!I&&!x&&g(A);E=A,I||x||C?c(w)?E=w:u(w)?E=o(w):x?(q=!1,E=n(A,!0)):C?(q=!1,E=r(A,!0)):E=[]:d(A)||s(A)?(E=w,s(w)?E=h(w):b(w)&&!m(w)||(E=i(A))):q=!1}q&&(y.set(A,E),_(E,A,k,v,y),y.delete(A)),a(e,l,E)}}},2865:e=>{e.exports=function(e){return e}},3007:e=>{e.exports=function(e,t){var l=-1,a=e.length;for(t||(t=Array(a));++l<a;)t[l]=e[l];return t}},3221:e=>{e.exports=function(e){return function(t,l,a){for(var n=-1,r=Object(t),o=a(t),i=o.length;i--;){var s=o[e?i:++n];if(!1===l(r[s],s,r))break}return t}}},3222:e=>{e.exports=function(e){return e}},3243:(e,t,l)=>{var a=l(6110),n=function(){try{var e=a(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=n},3290:(e,t,l)=>{e=l.nmd(e);var a=l(9325),n=t&&!t.nodeType&&t,r=n&&e&&!e.nodeType&&e,o=r&&r.exports===n?a.Buffer:void 0,i=o?o.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var l=e.length,a=i?i(l):new e.constructor(l);return e.copy(a),a}},3360:(e,t,l)=>{var a=l(3243);e.exports=function(e,t,l){"__proto__"==t&&a?a(e,t,{configurable:!0,enumerable:!0,value:l,writable:!0}):e[t]=l}},3488:e=>{e.exports=function(e){return e}},3656:e=>{e.exports=function(){return!1}},3693:(e,t,l)=>{var a=l(4894),n=l(346);e.exports=function(e){return n(e)&&a(e)}},3702:e=>{e.exports=function(){this.__data__=[],this.size=0}},3805:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},3912:(e,t,l)=>{var a=l(1074),n=l(9698),r=l(2054);e.exports=function(e){return n(e)?r(e):a(e)}},4058:(e,t,l)=>{var a=l(4792),n=l(5539)(function(e,t,l){return t=t.toLowerCase(),e+(l?a(t):t)});e.exports=n},4248:e=>{e.exports=function(e,t){for(var l=-1,a=null==e?0:e.length;++l<a;)if(t(e[l],l,e))return!0;return!1}},4335:e=>{e.exports=function(e,t){return function(l){return e(t(l))}}},4739:(e,t,l)=>{var a=l(6025);e.exports=function(e){var t=this.__data__,l=a(t,e);return l<0?void 0:t[l][1]}},4792:(e,t,l)=>{var a=l(3222),n=l(5808);e.exports=function(e){return n(a(e).toLowerCase())}},4840:(e,t,l)=>{var a="object"==typeof l.g&&l.g&&l.g.Object===Object&&l.g;e.exports=a},4848:(e,t,l)=>{"use strict";e.exports=l(1020)},4894:(e,t,l)=>{var a=l(1882),n=l(294);e.exports=function(e){return null!=e&&n(e.length)&&!a(e)}},4974:e=>{e.exports=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}},5160:e=>{e.exports=function(e,t,l){var a=-1,n=e.length;t<0&&(t=-t>n?0:n+t),(l=l>n?n:l)<0&&(l+=n),n=t>l?0:l-t>>>0,t>>>=0;for(var r=Array(n);++a<n;)r[a]=e[a+t];return r}},5250:(e,t,l)=>{var a=l(7217),n=l(7805),r=l(6649),o=l(2824),i=l(3805),s=l(7241),c=l(4974);e.exports=function e(t,l,u,p,m){t!==l&&r(l,function(r,s){if(m||(m=new a),i(r))o(t,l,s,u,e,p,m);else{var b=p?p(c(t,s),r,s+"",t,l,m):void 0;void 0===b&&(b=r),n(t,s,b)}},s)}},5287:(e,t)=>{"use strict";var l=Symbol.for("react.element"),a=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),s=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),b=Symbol.iterator;var d={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,f={};function h(e,t,l){this.props=e,this.context=t,this.refs=f,this.updater=l||d}function k(){}function _(e,t,l){this.props=e,this.context=t,this.refs=f,this.updater=l||d}h.prototype.isReactComponent={},h.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},h.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},k.prototype=h.prototype;var v=_.prototype=new k;v.constructor=_,g(v,h.prototype),v.isPureReactComponent=!0;var y=Array.isArray,w=Object.prototype.hasOwnProperty,A={current:null},S={key:!0,ref:!0,__self:!0,__source:!0};function E(e,t,a){var n,r={},o=null,i=null;if(null!=t)for(n in void 0!==t.ref&&(i=t.ref),void 0!==t.key&&(o=""+t.key),t)w.call(t,n)&&!S.hasOwnProperty(n)&&(r[n]=t[n]);var s=arguments.length-2;if(1===s)r.children=a;else if(1<s){for(var c=Array(s),u=0;u<s;u++)c[u]=arguments[u+2];r.children=c}if(e&&e.defaultProps)for(n in s=e.defaultProps)void 0===r[n]&&(r[n]=s[n]);return{$$typeof:l,type:e,key:o,ref:i,props:r,_owner:A.current}}function q(e){return"object"==typeof e&&null!==e&&e.$$typeof===l}var I=/\/+/g;function x(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(e){return t[e]})}(""+e.key):t.toString(36)}function C(e,t,n,r,o){var i=typeof e;"undefined"!==i&&"boolean"!==i||(e=null);var s=!1;if(null===e)s=!0;else switch(i){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case l:case a:s=!0}}if(s)return o=o(s=e),e=""===r?"."+x(s,0):r,y(o)?(n="",null!=e&&(n=e.replace(I,"$&/")+"/"),C(o,t,n,"",function(e){return e})):null!=o&&(q(o)&&(o=function(e,t){return{$$typeof:l,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(o,n+(!o.key||s&&s.key===o.key?"":(""+o.key).replace(I,"$&/")+"/")+e)),t.push(o)),1;if(s=0,r=""===r?".":r+":",y(e))for(var c=0;c<e.length;c++){var u=r+x(i=e[c],c);s+=C(i,t,n,u,o)}else if(u=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=b&&e[b]||e["@@iterator"])?e:null}(e),"function"==typeof u)for(e=u.call(e),c=0;!(i=e.next()).done;)s+=C(i=i.value,t,n,u=r+x(i,c++),o);else if("object"===i)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return s}function T(e,t,l){if(null==e)return e;var a=[],n=0;return C(e,a,"","",function(e){return t.call(l,e,n++)}),a}function N(e){if(-1===e._status){var t=e._result;(t=t()).then(function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)},function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)}),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var P={current:null},B={transition:null},V={ReactCurrentDispatcher:P,ReactCurrentBatchConfig:B,ReactCurrentOwner:A};function O(){throw Error("act(...) is not supported in production builds of React.")}t.Children={map:T,forEach:function(e,t,l){T(e,function(){t.apply(this,arguments)},l)},count:function(e){var t=0;return T(e,function(){t++}),t},toArray:function(e){return T(e,function(e){return e})||[]},only:function(e){if(!q(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},t.Component=h,t.Fragment=n,t.Profiler=o,t.PureComponent=_,t.StrictMode=r,t.Suspense=u,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=V,t.act=O,t.cloneElement=function(e,t,a){if(null==e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var n=g({},e.props),r=e.key,o=e.ref,i=e._owner;if(null!=t){if(void 0!==t.ref&&(o=t.ref,i=A.current),void 0!==t.key&&(r=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(c in t)w.call(t,c)&&!S.hasOwnProperty(c)&&(n[c]=void 0===t[c]&&void 0!==s?s[c]:t[c])}var c=arguments.length-2;if(1===c)n.children=a;else if(1<c){s=Array(c);for(var u=0;u<c;u++)s[u]=arguments[u+2];n.children=s}return{$$typeof:l,type:e.type,key:r,ref:o,props:n,_owner:i}},t.createContext=function(e){return(e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:i,_context:e},e.Consumer=e},t.createElement=E,t.createFactory=function(e){var t=E.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:c,render:e}},t.isValidElement=q,t.lazy=function(e){return{$$typeof:m,_payload:{_status:-1,_result:e},_init:N}},t.memo=function(e,t){return{$$typeof:p,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=B.transition;B.transition={};try{e()}finally{B.transition=t}},t.unstable_act=O,t.useCallback=function(e,t){return P.current.useCallback(e,t)},t.useContext=function(e){return P.current.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e){return P.current.useDeferredValue(e)},t.useEffect=function(e,t){return P.current.useEffect(e,t)},t.useId=function(){return P.current.useId()},t.useImperativeHandle=function(e,t,l){return P.current.useImperativeHandle(e,t,l)},t.useInsertionEffect=function(e,t){return P.current.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return P.current.useLayoutEffect(e,t)},t.useMemo=function(e,t){return P.current.useMemo(e,t)},t.useReducer=function(e,t,l){return P.current.useReducer(e,t,l)},t.useRef=function(e){return P.current.useRef(e)},t.useState=function(e){return P.current.useState(e)},t.useSyncExternalStore=function(e,t,l){return P.current.useSyncExternalStore(e,t,l)},t.useTransition=function(){return P.current.useTransition()},t.version="18.3.1"},5288:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},5364:(e,t,l)=>{var a=l(5250),n=l(999)(function(e,t,l){a(e,t,l)});e.exports=n},5434:e=>{var t=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;e.exports=function(e){return t.test(e)}},5527:e=>{e.exports=function(){return!1}},5529:(e,t,l)=>{var a=l(9344),n=l(8879),r=l(5527);e.exports=function(e){return"function"!=typeof e.constructor||r(e)?{}:a(n(e))}},5539:(e,t,l)=>{var a=l(882),n=l(828),r=l(6645),o=RegExp("['’]","g");e.exports=function(e){return function(t){return a(r(n(t).replace(o,"")),e,"")}}},5808:(e,t,l)=>{var a=l(2507)("toUpperCase");e.exports=a},5861:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},5911:(e,t,l)=>{var a=l(8859),n=l(4248),r=l(9219);e.exports=function(e,t,l,o,i,s){var c=1&l,u=e.length,p=t.length;if(u!=p&&!(c&&p>u))return!1;var m=s.get(e),b=s.get(t);if(m&&b)return m==t&&b==e;var d=-1,g=!0,f=2&l?new a:void 0;for(s.set(e,t),s.set(t,e);++d<u;){var h=e[d],k=t[d];if(o)var _=c?o(k,h,d,t,e,s):o(h,k,d,e,t,s);if(void 0!==_){if(_)continue;g=!1;break}if(f){if(!n(t,function(e,t){if(!r(f,t)&&(h===e||i(h,e,l,o,s)))return f.push(t)})){g=!1;break}}else if(h!==k&&!i(h,k,l,o,s)){g=!1;break}}return s.delete(e),s.delete(t),g}},6025:(e,t,l)=>{var a=l(5288);e.exports=function(e,t){for(var l=e.length;l--;)if(a(e[l][0],t))return l;return-1}},6110:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},6131:e=>{e.exports=function(e,t,l){for(var a=l-1,n=e.length;++a<n;)if(e[a]===t)return a;return-1}},6449:e=>{var t=Array.isArray;e.exports=t},6540:(e,t,l)=>{"use strict";e.exports=l(5287)},6547:(e,t,l)=>{var a=l(3360),n=l(5288),r=Object.prototype.hasOwnProperty;e.exports=function(e,t,l){var o=e[t];r.call(e,t)&&n(o,l)&&(void 0!==l||t in e)||a(e,t,l)}},6645:(e,t,l)=>{var a=l(1733),n=l(5434),r=l(3222),o=l(2225);e.exports=function(e,t,l){return e=r(e),void 0===(t=l?void 0:t)?n(e)?o(e):a(e):e.match(t)||[]}},6649:(e,t,l)=>{var a=l(3221)();e.exports=a},6757:(e,t,l)=>{var a=l(1033),n=Math.max;e.exports=function(e,t,l){return t=n(void 0===t?e.length-1:t,0),function(){for(var r=arguments,o=-1,i=n(r.length-t,0),s=Array(i);++o<i;)s[o]=r[t+o];o=-1;for(var c=Array(t+1);++o<t;)c[o]=r[o];return c[t]=l(s),a(e,this,c)}}},6800:e=>{e.exports=function(){return!1}},6942:(e,t)=>{var l;!function(){"use strict";var a={}.hasOwnProperty;function n(){for(var e="",t=0;t<arguments.length;t++){var l=arguments[t];l&&(e=o(e,r(l)))}return e}function r(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return n.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var l in e)a.call(e,l)&&e[l]&&(t=o(t,l));return t}function o(e,t){return t?e?e+" "+t:e+t:e}e.exports?(n.default=n,e.exports=n):void 0===(l=function(){return n}.apply(t,[]))||(e.exports=l)}()},7068:(e,t,l)=>{var a=l(7217),n=l(5911),r=l(1986),o=l(689),i=l(5861),s=l(6449),c=l(3656),u=l(7167),p="[object Arguments]",m="[object Array]",b="[object Object]",d=Object.prototype.hasOwnProperty;e.exports=function(e,t,l,g,f,h){var k=s(e),_=s(t),v=k?m:i(e),y=_?m:i(t),w=(v=v==p?b:v)==b,A=(y=y==p?b:y)==b,S=v==y;if(S&&c(e)){if(!c(t))return!1;k=!0,w=!1}if(S&&!w)return h||(h=new a),k||u(e)?n(e,t,l,g,f,h):r(e,t,v,l,g,f,h);if(!(1&l)){var E=w&&d.call(e,"__wrapped__"),q=A&&d.call(t,"__wrapped__");if(E||q){var I=E?e.value():e,x=q?t.value():t;return h||(h=new a),f(I,x,l,g,h)}}return!!S&&(h||(h=new a),o(e,t,l,g,f,h))}},7167:e=>{e.exports=function(){return!1}},7217:(e,t,l)=>{var a=l(3702),n=l(80),r=l(4739),o=l(8655),i=l(1175);function s(e){var t=-1,l=null==e?0:e.length;for(this.clear();++t<l;){var a=e[t];this.set(a[0],a[1])}}s.prototype.clear=a,s.prototype.delete=n,s.prototype.get=r,s.prototype.has=o,s.prototype.set=i,e.exports=s},7241:e=>{e.exports=function(e){var t=[];if(null!=e)for(var l in Object(e))t.push(l);return t}},7556:e=>{e.exports=function(e){return e}},7805:(e,t,l)=>{var a=l(3360),n=l(5288);e.exports=function(e,t,l){(void 0!==l&&!n(e[t],l)||void 0===l&&!(t in e))&&a(e,t,l)}},7828:(e,t,l)=>{var a=l(9325).Uint8Array;e.exports=a},8655:(e,t,l)=>{var a=l(6025);e.exports=function(e){return a(this.__data__,e)>-1}},8754:(e,t,l)=>{var a=l(5160);e.exports=function(e,t,l){var n=e.length;return l=void 0===l?n:l,!t&&l>=n?e:a(e,t,l)}},8859:(e,t,l)=>{var a=l(6449);e.exports=function(){if(!arguments.length)return[];var e=arguments[0];return a(e)?e:[e]}},8879:(e,t,l)=>{var a=l(4335)(Object.getPrototypeOf,Object);e.exports=a},9219:(e,t,l)=>{var a=l(6131);e.exports=function(e,t){return!!(null==e?0:e.length)&&a(e,t,0)>-1}},9302:(e,t,l)=>{var a=l(3488),n=l(6757),r=l(2865);e.exports=function(e,t){return r(n(e,t,a),e+"")}},9325:(e,t,l)=>{var a=l(4840),n="object"==typeof self&&self&&self.Object===Object&&self,r=a||n||Function("return this")();e.exports=r},9344:(e,t,l)=>{var a=l(3805),n=Object.create,r=function(){function e(){}return function(t){if(!a(t))return{};if(n)return n(t);e.prototype=t;var l=new e;return e.prototype=void 0,l}}();e.exports=r},9653:(e,t,l)=>{var a=l(7828);e.exports=function(e){var t=new e.constructor(e.byteLength);return new a(t).set(new a(e)),t}},9698:e=>{var t=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");e.exports=function(e){return t.test(e)}},9884:(e,t,l)=>{var a=l(1791),n=l(7241);e.exports=function(e){return a(e,n(e))}}},t={};function l(a){var n=t[a];if(void 0!==n)return n.exports;var r=t[a]={id:a,loaded:!1,exports:{}};return e[a](r,r.exports,l),r.loaded=!0,r.exports}l.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return l.d(t,{a:t}),t},l.d=(e,t)=>{for(var a in t)l.o(t,a)&&!l.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},l.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),l.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),l.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{"use strict";const e=wp.i18n,t=wp.blocks;var a=l(4058),n=l.n(a);const r=wp.hooks,o=wp.data;var i,s=l(6540);function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var l=arguments[t];for(var a in l)({}).hasOwnProperty.call(l,a)&&(e[a]=l[a])}return e},c.apply(null,arguments)}const u=e=>s.createElement("svg",c({xmlns:"http://www.w3.org/2000/svg",xmlSpace:"preserve",viewBox:"0 0 24 24"},e),i||(i=s.createElement("path",{d:"M13 18h2c.6 0 1 .4 1 1s-.4 1-1 1H9c-.6 0-1-.4-1-1s.4-1 1-1h2v-2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2h16c1.1 0 2 .9 2 2v8c0 1.1-.9 2-2 2h-7zM4 6v8h16V6z"})));var p;function m(){return m=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var l=arguments[t];for(var a in l)({}).hasOwnProperty.call(l,a)&&(e[a]=l[a])}return e},m.apply(null,arguments)}const b=e=>s.createElement("svg",m({xmlns:"http://www.w3.org/2000/svg",xmlSpace:"preserve",viewBox:"0 0 24 24"},e),p||(p=s.createElement("path",{d:"M6 4v15h12V4zm0-2h12c1.1 0 2 .9 2 2v16c0 1.1-.9 2-2 2H6c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2"})));var d;function g(){return g=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var l=arguments[t];for(var a in l)({}).hasOwnProperty.call(l,a)&&(e[a]=l[a])}return e},g.apply(null,arguments)}const f=e=>s.createElement("svg",g({xmlns:"http://www.w3.org/2000/svg",xmlSpace:"preserve",viewBox:"0 0 24 24"},e),d||(d=s.createElement("path",{d:"M8 2h8c1.1 0 2 .9 2 2v16c0 1.1-.9 2-2 2H8c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2m0 2v15h8V4z"}))),h="desktop",k={desktop:{label:(0,e.__)("Desktop","qi-blocks"),icon:wp.element.createElement(u,null)},tablet:{label:(0,e.__)("Tablet","qi-blocks"),icon:wp.element.createElement(b,null)},mobile:{label:(0,e.__)("Mobile","qi-blocks"),icon:wp.element.createElement(f,null)}};let _=h;const v=()=>_,y=wp.components,w=e=>{const t={...e},{blockAttributeKey:l,blockAttributes:a,setAttributes:n,repeater:r,repeaterItemIndex:o,repeaterItemKey:i,repeaterSetAttributes:s,repeaterGetAttributes:c}=t;return t.getAttributeValue=()=>{let e=a[l];return r&&(e=c(i,o)),e||!1},t.setAttributeValue=e=>{r?s(i,e,o):n({[l]:e})},wp.element.createElement("div",{className:"qodef-on-off-option"},wp.element.createElement(y.ToggleControl,{label:t.label,help:t.help,checked:t.getAttributeValue(),onChange:()=>t.setAttributeValue(!t.getAttributeValue())}))};w.defaultProps={label:(0,e.__)("Show","qi-blocks"),help:"",blockAttributeKey:"",blockAttributes:{},setAttributes:()=>{},repeater:!1,repeaterItemIndex:0,repeaterItemKey:"",repeaterSetAttributes:()=>{},repeaterGetAttributes:()=>{}};const A=w,S=[{classSuffix:"desktop",label:(0,e.__)("Hide On Desktop","qi-blocks"),blockAttributeKey:"hideOnDesktop"},{classSuffix:"tablet",label:(0,e.__)("Hide On Tablet","qi-blocks"),blockAttributeKey:"hideOnTablet"},{classSuffix:"mobile",label:(0,e.__)("Hide On Mobile","qi-blocks"),blockAttributeKey:"hideOnMobile"}],E=e=>{const t={...e},{label:l,description:a,blockAttributeKeys:n,blockAttributes:r,setAttributes:o}=t;return wp.element.createElement("div",{className:"qodef-visibility-group-option"},l&&wp.element.createElement("label",{className:"qodef-option-label"},l),a&&wp.element.createElement("p",{className:"qodef-option-description"},a),n.map(e=>wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(A,{label:e.label,blockAttributeKey:e.blockAttributeKey,blockAttributes:r,setAttributes:o}))))};E.defaultProps={label:(0,e.__)("Visibility","qi-blocks"),description:(0,e.__)("Responsive visibility will take effect only on preview or live page, and not while editing in Gutenberg.","qi-blocks"),blockAttributeKeys:S,blockAttributes:{},setAttributes:()=>{}};const q=(e,t="")=>{const l=e=>P(t,e),a=[];return e[l("cssClasses")]&&a.push(e[l("cssClasses")]),void 0!==e[l("EntranceAnimation")]&&""!==e[l("EntranceAnimation")]&&(a.push("qodef-entrance-animation--on"),e[l("EntranceAnimationDuration")]&&a.push("qodef-animation-speed--"+e[l("EntranceAnimationDuration")])),e[l("BlockWidth")]&&a.push("qodef-width--"+e[l("BlockWidth")]),e[l("BlockWidthTablet")]&&a.push("qodef-width--tablet--"+e[l("BlockWidthTablet")]),e[l("BlockWidthMobile")]&&a.push("qodef-width--mobile--"+e[l("BlockWidthMobile")]),a.push((e=>{const t=[];return S.map(l=>{const a="qodef-hide-on--"+l.classSuffix,n=e[l.blockAttributeKey];t.includes(a)&&!n?t.filter(function(e){return e!==a}):!t.includes(a)&&n&&t.push(a)}),t.join(" ")})(e)),a.join(" ")},I=(e,t="")=>{let l=["qodef-block-container"];return z(e.uniqueClass,"all")&&l.push(e.uniqueClass),l.push(q(e,t)),l.join(" ")},x=(e,t="")=>{let l={};const a=((e,t="")=>{const l=(e,l="")=>P(t,e,l),a={};return void 0!==e[l("EntranceAnimation")]&&""!==e[l("EntranceAnimation")]&&(a["data-animation"]=e[l("EntranceAnimation")]),"custom"!==e[l("BlockWidth")]&&"custom"!==e[l("BlockWidthTablet")]&&"custom"!==e[l("BlockWidthMobile")]||["","Tablet","Mobile"].forEach(t=>{const n=e[l("BlockCustomWidth",t)],r=e[l("BlockCustomWidthDecimal",t)],o=e[l("BlockCustomWidthUnit",t)];R(o)&&n?a["data-width"+(t?"-"+t.toLowerCase():"")]=parseInt(n,10)+o:L(o)&&r&&(a["data-width"+(t?"-"+t.toLowerCase():"")]=parseFloat(r)+o)}),a})(e,t);return a&&(l={...l,...a}),l},C=(e,t="",l=[])=>N(e,t,l),T=(e,t,l=[])=>{if(!e)return"";let a=[`qi-block-${e}`,"qodef-block","qodef-m"];return z(t.attributes.className,"all")&&a.push(t.attributes.className),l&&(a=[...a,...l]),a.join(" ")},N=(e,t="",l=[])=>{const a=e=>P(t,e);if(!e)return"";let n=[];return z(e[a("cssId")],"all")&&n.push(e[a("cssId")]),l&&(n=[...n,...l]),n.join(" ")},P=(t,l,a)=>(t=t||"",l=l||"",a=a||"",n()((0,e.sprintf)("%s%s%s",t,l,a))),B=e=>e?e.charAt(0).toUpperCase()+e.slice(1):"",V=e=>e&&h!==e?B(e):"",O=(e,t)=>{let l=e.desktop;return"mobile"===t&&(l={...l,...e.tablet}),{...l,...e[t]}},D=(e,t=!0)=>{let l="";return Object.entries(e).map(([e,a])=>{l+=`${e.replace(/([A-Z])/g,(e,t,l)=>(l>0?"-":"")+e.toLowerCase())}: ${a} ${t?"!important":""};`}),l},R=e=>["px"].includes(e),L=e=>["em","rem","%","vw","vh"].includes(e),M=(e,t="integer")=>{let l="";return 0===e||"0"===e?l=0:e&&(l=parseInt(e,10),"decimal"===t&&(l=parseFloat(e))),l},z=(e,t="")=>{let l=void 0!==e&&""!==e;return"all"===t&&(l=void 0!==e&&e),l},U=e=>{let t="";return 0===e||"0"===e?t=0:e&&(t=e),t},F=(t,l=!0,a=[])=>{let n=[],o=[];if(t){switch(l&&(n=[{value:"",label:(0,e.__)("Default","qi-blocks")}]),t){case"no_yes":o=[{value:"no",label:(0,e.__)("No","qi-blocks")},{value:"yes",label:(0,e.__)("Yes","qi-blocks")}];break;case"yes_no":o=[{value:"yes",label:(0,e.__)("Yes","qi-blocks")},{value:"no",label:(0,e.__)("No","qi-blocks")}];break;case"link_target":o=[{value:"_self",label:(0,e.__)("Same Window","qi-blocks")},{value:"_blank",label:(0,e.__)("New Window","qi-blocks")}];break;case"column_gap":o=[{value:"huge",label:(0,e.__)("Huge (35)","qi-blocks")},{value:"large",label:(0,e.__)("Large (25)","qi-blocks")},{value:"medium",label:(0,e.__)("Medium (20)","qi-blocks")},{value:"normal",label:(0,e.__)("Normal (15)","qi-blocks")},{value:"small",label:(0,e.__)("Small (10)","qi-blocks")},{value:"tiny",label:(0,e.__)("Tiny (5)","qi-blocks")},{value:"no",label:(0,e.__)("No (0)","qi-blocks")}];break;case"columns_responsive":o=[{value:"predefined",label:(0,e.__)("Predefined","qi-blocks")},{value:"custom",label:(0,e.__)("Custom","qi-blocks")}];break;case"masonry_image_sizes":o=[{value:"square",label:(0,e.__)("Square","qi-blocks")},{value:"landscape",label:(0,e.__)("Landscape","qi-blocks")},{value:"portrait",label:(0,e.__)("Portrait","qi-blocks")},{value:"huge-square",label:(0,e.__)("Huge","qi-blocks")}];break;case"image_sizes":o=[{value:"full",label:(0,e.__)("Original","qi-blocks")},{value:"thumbnail",label:(0,e.__)("Thumbnail","qi-blocks")},{value:"medium",label:(0,e.__)("Medium","qi-blocks")},{value:"large",label:(0,e.__)("Large","qi-blocks")}];break;case"title_tag":o=[{value:"h1",label:(0,e.__)("H1","qi-blocks")},{value:"h2",label:(0,e.__)("H2","qi-blocks")},{value:"h3",label:(0,e.__)("H3","qi-blocks")},{value:"h4",label:(0,e.__)("H4","qi-blocks")},{value:"h5",label:(0,e.__)("H5","qi-blocks")},{value:"h6",label:(0,e.__)("H6","qi-blocks")},{value:"p",label:(0,e.__)("Paragraph","qi-blocks")}];break;case"font_weight":o=[{value:"normal",label:(0,e.__)("Normal","qi-blocks")},{value:"bold",label:(0,e.__)("Bold","qi-blocks")},{value:"100",label:(0,e.__)("Thin (100)","qi-blocks")},{value:"200",label:(0,e.__)("Extra Light (200)","qi-blocks")},{value:"300",label:(0,e.__)("Light (300)","qi-blocks")},{value:"400",label:(0,e.__)("Normal (400)","qi-blocks")},{value:"500",label:(0,e.__)("Medium (500)","qi-blocks")},{value:"600",label:(0,e.__)("Semi Bold (600)","qi-blocks")},{value:"700",label:(0,e.__)("Bold (700)","qi-blocks")},{value:"800",label:(0,e.__)("Extra Bold (800)","qi-blocks")},{value:"900",label:(0,e.__)("Black (900)","qi-blocks")}];break;case"text_transform":o=[{value:"none",label:(0,e.__)("None","qi-blocks")},{value:"uppercase",label:(0,e.__)("Uppercase","qi-blocks")},{value:"lowercase",label:(0,e.__)("Lowercase","qi-blocks")},{value:"capitalize",label:(0,e.__)("Capitalize","qi-blocks")},{value:"normal",label:(0,e.__)("Normal","qi-blocks")}];break;case"font_style":o=[{value:"normal",label:(0,e.__)("Normal","qi-blocks")},{value:"italic",label:(0,e.__)("Italic","qi-blocks")},{value:"oblique",label:(0,e.__)("Oblique","qi-blocks")}];break;case"text_decoration":o=[{value:"none",label:(0,e.__)("None","qi-blocks")},{value:"underline",label:(0,e.__)("Underline","qi-blocks")},{value:"overline",label:(0,e.__)("Overline","qi-blocks")},{value:"line-through",label:(0,e.__)("Line-Through","qi-blocks")}];break;case"background_position":o=[{value:"center center",label:(0,e.__)("Center Center","qi-blocks")},{value:"center left",label:(0,e.__)("Center Left","qi-blocks")},{value:"center right",label:(0,e.__)("Center Right","qi-blocks")},{value:"top center",label:(0,e.__)("Top Center","qi-blocks")},{value:"top left",label:(0,e.__)("Top Left","qi-blocks")},{value:"top right",label:(0,e.__)("Top Right","qi-blocks")},{value:"bottom center",label:(0,e.__)("Bottom Center","qi-blocks")},{value:"bottom left",label:(0,e.__)("Bottom Left","qi-blocks")},{value:"bottom right",label:(0,e.__)("Bottom Right","qi-blocks")}];break;case"background_attachment":o=[{value:"scroll",label:(0,e.__)("Scroll","qi-blocks")},{value:"fixed",label:(0,e.__)("Fixed","qi-blocks")}];break;case"background_repeat":o=[{value:"no-repeat",label:(0,e.__)("No-repeat","qi-blocks")},{value:"repeat",label:(0,e.__)("Repeat","qi-blocks")},{value:"repeat-x",label:(0,e.__)("Repeat-x","qi-blocks")},{value:"repeat-y",label:(0,e.__)("Repeat-y","qi-blocks")}];break;case"background_size":o=[{value:"auto",label:(0,e.__)("Auto","qi-blocks")},{value:"cover",label:(0,e.__)("Cover","qi-blocks")},{value:"contain",label:(0,e.__)("Contain","qi-blocks")}];break;case"horizontal_alignment":o=[{value:"left",label:(0,e.__)("Left","qi-blocks")},{value:"right",label:(0,e.__)("Right","qi-blocks")},{value:"center",label:(0,e.__)("Center","qi-blocks")}];break;case"vertical_alignment":o=[{value:"top",label:(0,e.__)("Top","qi-blocks")},{value:"middle",label:(0,e.__)("Middle","qi-blocks")},{value:"bottom",label:(0,e.__)("Bottom","qi-blocks")}];break;case"html_tag":o=[{value:"section",label:(0,e.__)("Section","qi-blocks")},{value:"div",label:(0,e.__)("Div","qi-blocks")},{value:"main",label:(0,e.__)("Main","qi-blocks")},{value:"article",label:(0,e.__)("Article","qi-blocks")},{value:"nav",label:(0,e.__)("Nav","qi-blocks")},{value:"footer",label:(0,e.__)("Footer","qi-blocks")},{value:"header",label:(0,e.__)("Header","qi-blocks")},{value:"aside",label:(0,e.__)("Aside","qi-blocks")}];break;case"appear_animation":o=[{value:"none",label:(0,e.__)("None","qi-blocks")},{value:"from-bottom",label:(0,e.__)("From Bottom","qi-blocks")},{value:"from-top",label:(0,e.__)("From Top","qi-blocks")},{value:"from-left",label:(0,e.__)("From Left","qi-blocks")},{value:"from-right",label:(0,e.__)("From Right","qi-blocks")},{value:"fade",label:(0,e.__)("Fade in","qi-blocks")}];break;case"appear_delay":o=[{value:"random",label:(0,e.__)("Random","qi-blocks")},{value:"ms",label:(0,e.__)("Set ms","qi-blocks")}];break;case"responsive_screens":o=[{value:"1024",label:(0,e.__)("Below 1024px","qi-blocks")},{value:"768",label:(0,e.__)("Below 768px","qi-blocks")},{value:"680",label:(0,e.__)("Below 680px","qi-blocks")},{value:"480",label:(0,e.__)("Below 480px","qi-blocks")}];break;case"order_by":o=[{value:"date",label:(0,e.__)("Date","qi-blocks")},{value:"id",label:(0,e.__)("ID","qi-blocks")},{value:"title",label:(0,e.__)("Title","qi-blocks")}];break;case"order":o=[{value:"desc",label:(0,e.__)("Descending","qi-blocks")},{value:"asc",label:(0,e.__)("Ascending","qi-blocks")}];break;case"border_style":o=[{value:"solid",label:(0,e.__)("Solid","qi-blocks")},{value:"dashed",label:(0,e.__)("Dashed","qi-blocks")},{value:"dotted",label:(0,e.__)("Dotted","qi-blocks")}]}n=[...n,...o],a&&(n=[...n,...a])}return(0,r.applyFilters)("qi-blocks-filter-options-pool",n)},j=(e,t="",l={cssProp:"",value:""})=>{const{attributes:a,blockAttrName:n,cssProp:r}=e,o=z(e,"all")&&void 0!==e.direction&&e.direction?B(e.direction):"",i=!!z(e,"all")&&(e.customUnitValue??!1);let s={},c={},u={};return Object.entries(k).map(([e])=>{let p=V(e),m="",b=n+o+p,d=n+o+"Decimal"+p,g=a[n+"Unit"+p];(z(a[b])||z(a[d]))&&(R(g)&&z(a[b])&&!i?m=M(a[b])+g:L(g)&&z(a[d])&&!i?m=M(a[d],"decimal")+g:""!==a[b]&&(m=a[b]));const f=e=>{let l=e;if(t.includes("%s")){const a=t.split("%s");l="",a.forEach((t,n)=>{l+=t,n!==a.length-1&&(l+=e)})}return l};if(m)switch(e){case"desktop":s[r]=t?f(m):m,l.cssProp&&l.value&&(s[l.cssProp]=l.value);break;case"tablet":c[r]=t?f(m):m,l.cssProp&&l.value&&(c[l.cssProp]=l.value);break;case"mobile":u[r]=t?f(m):m,l.cssProp&&l.value&&(u[l.cssProp]=l.value)}}),{desktop:s,tablet:c,mobile:u}},H=()=>({hideOnDesktop:{type:"boolean",default:!1},hideOnTablet:{type:"boolean",default:!1},hideOnMobile:{type:"boolean",default:!1}}),K=e=>{const{attrNameTemplate:t,attrName:l}=e,a=e=>P(t,l,e),n=!z(e,"all")||(e.allowUnitControl??!0),r=z(e,"all")&&e.disableDirections||[];let o={};return["Top","Right","Bottom","Left"].map(e=>{r.includes(e)||(o[a(e)]={type:"number",default:""},o[a(e+"Tablet")]={type:"number",default:""},o[a(e+"Mobile")]={type:"number",default:""},n&&(o[a(`${e}Decimal`)]={type:"number",default:""},o[a(`${e}DecimalTablet`)]={type:"number",default:""},o[a(`${e}DecimalMobile`)]={type:"number",default:""}))}),o[a("Unit")]={type:"string",default:"px"},o[a("UnitTablet")]={type:"string",default:"px"},o[a("UnitMobile")]={type:"string",default:"px"},o};K.defaultProps={attrNameTemplate:"",attrName:"",allowUnitControl:!0};const G=K,$=e=>{const{blockAttributeKey:t}=e,l=!!z(e,"all")&&(e.allowScreens??!1),a=!z(e,"all")||(e.allowUnits??!0),n=z(e,"all")&&e.optionType||"integer",r=z(e,"all")&&e.defaultValue||"",o="decimal"===n?r:"";let i={};return"integer"===n&&(i[t]={type:"number",default:r}),i[P(t,"Unit")]={type:"string",default:"px"},(a||"decimal"===n)&&(i[P(t,"Decimal")]={type:"number",default:o}),l&&(i[P(t,"Tablet")]={type:"number",default:""},i[P(t,"Mobile")]={type:"number",default:""},i[P(t,"UnitTablet")]={type:"string",default:"px"},i[P(t,"UnitMobile")]={type:"string",default:"px"},a&&(i[P(t,"DecimalTablet")]={type:"number",default:""},i[P(t,"DecimalMobile")]={type:"number",default:""})),i};$.defaultProps={allowScreens:!1,allowUnits:!0};const W=$,Y=e=>{const t=z(e,"all")&&e.attrNameTemplate||"",l=z(e,"all")&&e.attrName||"Background",a=e=>P(t,l+e),n=W({blockAttributeKey:a("XPosition"),allowScreens:!0}),r=W({blockAttributeKey:a("YPosition"),allowScreens:!0}),o=W({blockAttributeKey:a("SizeWidth"),allowScreens:!0});return{[a("Image")]:{type:"object",default:{id:null,url:"",alt:"",caption:""}},[a("ImageTablet")]:{type:"object",default:{id:null,url:"",alt:"",caption:""}},[a("ImageMobile")]:{type:"object",default:{id:null,url:"",alt:"",caption:""}},[a("Position")]:{type:"string",default:""},[a("PositionTablet")]:{type:"string",default:""},[a("PositionMobile")]:{type:"string",default:""},...n,...r,[a("Attachment")]:{type:"string",default:""},[a("Repeat")]:{type:"string",default:""},[a("RepeatTablet")]:{type:"string",default:""},[a("RepeatMobile")]:{type:"string",default:""},[a("Size")]:{type:"string",default:""},[a("SizeTablet")]:{type:"string",default:""},[a("SizeMobile")]:{type:"string",default:""},...o}};Y.defaultProps={attrNameTemplate:"",attrName:"Background"};const Z=Y,X=e=>{const t=z(e,"all")&&e.attrNameTemplate||"",l=e=>P(t,e),a=!!z(e,"all")&&(e.includeVideoBG??!1),n=Z({attrNameTemplate:t});let r={[l("BackgroundType")]:{type:"string",default:""},[l("BackgroundColor")]:{type:"string",default:""},...n,[l("BackgroundGradientColor1")]:{type:"string",default:""},[l("BackgroundGradientLocation1")]:{type:"number",default:""},[l("BackgroundGradientColor2")]:{type:"string",default:""},[l("BackgroundGradientLocation2")]:{type:"number",default:""},[l("BackgroundGradientType")]:{type:"string",default:"linear"},[l("BackgroundGradientTypeAngle")]:{type:"number",default:""},[l("BackgroundGradientTypePosition")]:{type:"string",default:"center center"}};if(a){const e={[l("BackgroundVideoLink")]:{type:"object",default:{id:null,url:"",alt:""}},[l("BackgroundVideoStartTime")]:{type:"number",default:""},[l("BackgroundVideoEndTime")]:{type:"number",default:""},[l("BackgroundVideoStartTime")]:{type:"number",default:""},[l("BackgroundVideoPlayOnce")]:{type:"boolean",default:!1},[l("BackgroundVideoPlayOnMobile")]:{type:"boolean",default:!1},[l("BackgroundVideoFallbackImage")]:{type:"object",default:{id:null,url:"",alt:""}}};r={...r,...e}}return r};X.defaultProps={attrNameTemplate:"",includeVideoBG:!1};const J=X,Q=e=>{const t=z(e,"all")&&e.attrNameTemplate||"",l=z(e,"all")&&e.attrName||"",a=z(e,"all")&&e.defaultValue||"",n=e=>P(t,l+e);return{[n("")]:{type:"string",default:a},[n("Tablet")]:{type:"string",default:""},[n("Mobile")]:{type:"string",default:""}}};Q.defaultProps={attrNameTemplate:"",attrName:"",defaultValue:""};const ee=Q,te=e=>{const t=z(e,"all")&&e.attrNameTemplate||"",l=z(e,"all")&&e.disableWidthDirections||[],a=!z(e,"all")||(e.allowBorderColor??!0),n=!z(e,"all")||(e.allowBorderRadius??!0),r=e=>P(t,e),o=G({attrNameTemplate:t,attrName:"BorderWidth",disableDirections:l,allowUnitControl:!1}),i=a?{[r("BorderColor")]:{type:"string",default:""}}:{},s=n?G({attrNameTemplate:t,attrName:"BorderRadius"}):{};return{[r("BorderStyle")]:{type:"string",default:""},...i,...o,...s}};te.defaultProps={attrNameTemplate:"",allowBorderColor:!0,allowBorderRadius:!0};const le=te,ae=e=>{const t=z(e,"all")&&e.attrNameTemplate||"",l=e=>P(t,e);return{[l("BoxShadowColor")]:{type:"string",default:""},[l("BoxShadowHorizontal")]:{type:"number",default:""},[l("BoxShadowVertical")]:{type:"number",default:""},[l("BoxShadowBlur")]:{type:"number",default:""},[l("BoxShadowSpread")]:{type:"number",default:""},[l("BoxShadowPosition")]:{type:"string",default:""}}};ae.defaultProps={attrNameTemplate:""};const ne=ae,re=e=>{const t=z(e,"all")&&e.excludePanels||[],l=z(e,"all")&&e.includePanels||[];let a=l&&l.length?l:["advanced","motion-effects","background","border","positioning","responsive"];const n=e=>P("",e);t&&t.length&&t.forEach(e=>{a.splice(a.indexOf(e),1)});let r={};const o=H();if(a.includes("advanced")){const e=G({attrName:n("Margin")}),t=G({attrName:n("Padding")});r={...r,...e,...t,[n("zIndex")]:{type:"number",default:""},[n("cssId")]:{type:"string",default:""},[n("cssClasses")]:{type:"string",default:""}}}if(a.includes("motion-effects")&&(r={...r,[n("EntranceAnimation")]:{type:"string",default:""},[n("EntranceAnimationDuration")]:{type:"string",default:"normal"},[n("EntranceAnimationDelay")]:{type:"number",default:""}}),a.includes("background")){const e=J({attrNameTemplate:"Advanced"});r={...r,...e}}if(a.includes("border")){const e=le({attrNameTemplate:"Advanced"}),t=ne({attrNameTemplate:"Advanced"});r={...r,...e,...t}}if(a.includes("positioning")){const e=ee({attrName:n("BlockWidth")}),t=W({blockAttributeKey:n("BlockCustomWidth"),allowScreens:!0}),l=W({blockAttributeKey:n("PositionHorizontalOffset"),allowScreens:!0}),a=W({blockAttributeKey:n("PositionVerticalOffset"),allowScreens:!0});r={...r,...e,...t,[n("BlockPosition")]:{type:"string",default:""},[n("PositionHorizontalOrientation")]:{type:"string",default:"left"},...l,[n("PositionVerticalOrientation")]:{type:"string",default:"top"},...a}}return a.includes("responsive")&&(r={...r,...o}),r};re.defaultProps={excludePanels:[],includePanels:[]};const oe=re,ie=e=>{const t=z(e,"all")&&e.attrNameTemplate||"",l=e=>P(t,e);return{[l("Image")]:{type:"object",default:{id:null,url:"",alt:"",caption:"",html:""}},[l("ImageTablet")]:{type:"object",default:{id:null,url:"",alt:"",caption:"",html:""}},[l("ImageMobile")]:{type:"object",default:{id:null,url:"",alt:"",caption:"",html:""}},[l("ImageSize")]:{type:"string",default:"full"},[l("ImageSizeTablet")]:{type:"string",default:""},[l("ImageSizeMobile")]:{type:"string",default:""},[l("ImageCustomWidth")]:{type:"number",default:""},[l("ImageCustomWidthTablet")]:{type:"number",default:""},[l("ImageCustomWidthMobile")]:{type:"number",default:""},[l("ImageCustomHeight")]:{type:"number",default:""},[l("ImageCustomHeightTablet")]:{type:"number",default:""},[l("ImageCustomHeightMobile")]:{type:"number",default:""}}};ie.defaultProps={attrNameTemplate:""};const se=ie,ce=e=>{const t=z(e,"all")&&e.attrNameTemplate||"";let l={};return l[P(t,"Link")]={type:"string",default:""},l[P(t,"LinkTargetBlank")]={type:"boolean",default:!1},l[P(t,"LinkRelNofollow")]={type:"boolean",default:!1},l[P(t,"LinkCustomAttributes")]={type:"string",default:""},l};ce.defaultProps={attrNameTemplate:""};const ue=ce,pe=e=>{const t=z(e,"all")&&e.attrNameTemplate||"",l=z(e,"all")&&e.defaultValue||"",a="HorizontalAlignment";let n={};return n[P(t,a)]={type:"string",default:l},n[P(t,a,"Tablet")]={type:"string",default:""},n[P(t,a,"Mobile")]={type:"string",default:""},n};pe.defaultProps={attrNameTemplate:""};const me=pe,be={uniqueClass:{type:"string",default:""},imageAction:{type:"string",default:""},enablePopup:{type:"boolean",default:!1},galleryData:{type:"string",default:""},imageHover:{type:"string",default:""},imageZoomOrigin:{type:"string",default:""},...oe(),...se(),...ue(),...me(),...W({blockAttributeKey:"imageWidth",allowScreens:!0}),...W({blockAttributeKey:"imageMaxWidth",allowScreens:!0}),...W({blockAttributeKey:"imageHeight",allowScreens:!0}),...W({blockAttributeKey:"imageOpacity",allowUnits:!1,optionType:"decimal"}),...W({blockAttributeKey:"imageHoverOpacity",allowUnits:!1,optionType:"decimal"}),...W({blockAttributeKey:"transitionDuration",allowUnits:!1,optionType:"decimal"}),...le({attrNameTemplate:"Image"})};var de=l(5364),ge=l.n(de);const fe=wp.blockEditor,he=wp.compose,ke=wp.element;var _e=l(6942),ve=l.n(_e);const ye=e=>{const{unitType:t,unitValue:l,onChangeUnit:a}=e;if(e.units[t])return wp.element.createElement("ul",{className:"qodef-unit-control"},Object.entries(e.units[t]).map(([e,t],n)=>wp.element.createElement("li",{key:n},wp.element.createElement("a",{className:ve()("qodef-unit",{"qodef--selected":("p"===e?"%":e)===l}),onClick:a,"data-unit":"p"===e?"%":e},t))))};ye.defaultProps={units:{typography:{px:(0,e.__)("px","qi-blocks"),em:(0,e.__)("em","qi-blocks"),rem:(0,e.__)("rem","qi-blocks"),vw:(0,e.__)("vw","qi-blocks")},measure:{px:(0,e.__)("px","qi-blocks"),p:(0,e.__)("%","qi-blocks"),vw:(0,e.__)("vw","qi-blocks"),vh:(0,e.__)("vh","qi-blocks")},space:{px:(0,e.__)("px","qi-blocks"),p:(0,e.__)("%","qi-blocks"),em:(0,e.__)("em","qi-blocks")},height:{px:(0,e.__)("px","qi-blocks"),vw:(0,e.__)("vw","qi-blocks"),vh:(0,e.__)("vh","qi-blocks")},xPosition:{px:(0,e.__)("px","qi-blocks"),em:(0,e.__)("em","qi-blocks"),p:(0,e.__)("%","qi-blocks"),vw:(0,e.__)("vw","qi-blocks")},yPosition:{px:(0,e.__)("px","qi-blocks"),em:(0,e.__)("em","qi-blocks"),p:(0,e.__)("%","qi-blocks"),vh:(0,e.__)("vh","qi-blocks")},pxAndPercent:{px:(0,e.__)("px","qi-blocks"),p:(0,e.__)("%","qi-blocks")},pxAndEm:{px:(0,e.__)("px","qi-blocks"),em:(0,e.__)("em","qi-blocks")},pxEmVw:{px:(0,e.__)("px","qi-blocks"),em:(0,e.__)("em","qi-blocks"),vw:(0,e.__)("vw","qi-blocks")},pxPercentVh:{px:(0,e.__)("px","qi-blocks"),p:(0,e.__)("%","qi-blocks"),vh:(0,e.__)("vh","qi-blocks")},pxPercentVw:{px:(0,e.__)("px","qi-blocks"),p:(0,e.__)("%","qi-blocks"),vw:(0,e.__)("vw","qi-blocks")},pxEmRem:{px:(0,e.__)("px","qi-blocks"),em:(0,e.__)("em","qi-blocks"),rem:(0,e.__)("rem","qi-blocks")}},unitValue:"",onChangeUnit:()=>{}};const we=ye;class Ae extends ke.Component{constructor(){super(...arguments),this.state={screen:h,isScreenPickerOpen:!1,isMouseOver:!1}}onChangeScreen(e,t){const l=this;l.state.isScreenPickerOpen?(l.props.onChangeScreen(e),l.setState({screen:e,isScreenPickerOpen:!1}),_=e,!t&&l.changePreviewScreen(e),(0,r.doAction)("qi-blocks-action-screen-change",e)):t||l.setState({isScreenPickerOpen:!0}),window.addEventListener("click",e=>{const t=document.querySelectorAll(".qodef-screens-option .qodef-screens.qodef--opened");t.length&&!t[0].contains(e.target)&&l.setState({isScreenPickerOpen:!1})})}onOtherScreenChange(e){this.props.onChangeScreen(e),this.setState({screen:e})}componentDidMount(){const{instanceId:e}=this.props;(0,r.addAction)("qi-blocks-action-screen-change",`qi-blocks/components/screen-control-${e}`,this.onOtherScreenChange.bind(this))}componentWillUnmount(){const{instanceId:e}=this.props;(0,r.removeAction)("qi-blocks-action-screen-change",`qi-blocks/components/screen-control-${e}`)}changeScreenControls(e){v()!==e.previewScreen&&this.onChangeScreen(e.previewScreen,!0)}changePreviewScreen(e){if(e!==this.props.previewScreen){const t=(0,o.dispatch)("core/edit-post")||"",l=(0,o.dispatch)("core/edit-site")||"";let a;if(t){let{__experimentalSetPreviewDeviceType:e}=t;a=e}if(l){const{__experimentalSetPreviewDeviceType:e}=l;a=e}a&&a(B(e))}}render(){const e={...this.props},t={...this.state},{label:l,screens:a,isWidgetsArea:n,previewScreen:r}=e;let o=!1;return(a.length<1||n)&&(o=!0),h!==r&&t.screen!==r&&this.onOtherScreenChange(r),this.changeScreenControls(e),wp.element.createElement("div",{className:"qodef-screens-option"},h!==t.screen&&wp.element.createElement("style",null,"\n\t\t\t\t\t\t\t.qodef-screens-option .qodef-screens.qodef--opened {\n\t\t\t\t\t\t\t\ttop: calc(-4px - 22px * "+Object.keys(a).indexOf(t.screen)+");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t"),l&&wp.element.createElement("label",{className:"qodef-option-label"},l),!o&&wp.element.createElement("ul",{className:"qodef-screens "+(t.isScreenPickerOpen?"qodef--opened":"")},Object.entries(a).map(([e,l],n)=>n===Object.keys(a).indexOf(t.screen)||t.isScreenPickerOpen?wp.element.createElement("li",{className:"qodef-screen-item "+(e===t.screen?"qodef--selected":""),key:n},wp.element.createElement(y.Button,{className:"qodef-screen-item-button",onClick:()=>this.onChangeScreen(e),icon:l.icon,showTooltip:!1,label:l.label,"data-screen":e,onMouseEnter:()=>this.setState({isMouseOver:e}),onMouseLeave:()=>this.setState({isMouseOver:!1})}),e===t.isMouseOver&&wp.element.createElement("div",{className:"qodef-screen-item-tooltip"},l.label)):null)))}}Ae.defaultProps={label:"",screens:k,isWidgetsArea:!1,previewScreen:"desktop",onChangeScreen:()=>{}};const Se=(0,o.withSelect)(e=>{let t="desktop";return e("core/edit-post")&&(t="function"==typeof e("core/editor")?.getDeviceType?e("core/editor")?.getDeviceType()?.toLowerCase():e("core/edit-post").__experimentalGetPreviewDeviceType().toLowerCase()),e("core/edit-site")&&(t="function"==typeof e("core/editor")?.getDeviceType?e("core/editor")?.getDeviceType()?.toLowerCase():e("core/edit-site").__experimentalGetPreviewDeviceType().toLowerCase()),{isWidgetsArea:e("core/edit-widgets")&&!e("core/edit-post"),previewScreen:t}})((0,he.withInstanceId)(Ae));class Ee extends ke.Component{constructor(){super(...arguments),this.state={screen:v(),linkedInputs:!1}}getScreenLabelSuffix(e){const t=e||this.state.screen;return V(t)}getAttributeValue(e,t=""){const{blockAttributes:l,allowScreens:a,repeater:n,repeaterItemIndex:r,repeaterItemKey:o,repeaterGetAttributes:i}=this.props;let s=e;a&&t&&(s=e+t);let c=l[s];return n&&(c=i({key:o,childKey:s},r)),U(c)}setAttributeValue(e,t,l=""){const{setAttributes:a,allowScreens:n,repeater:r,repeaterItemIndex:o,repeaterItemKey:i,repeaterSetAttributes:s}=this.props;let c=e;n&&l&&(c=e+l),r?s({key:i,childKey:c},t,o):a({[c]:t})}render(){const t={...this.props},{label:l,allowScreens:a,rangeMax:n,rangeMin:r,rangeStep:o,rangeDecimalMax:i,rangeDecimalMin:s,rangeDecimalStep:c,repeater:u}=t,p=e=>P(t.attrNameTemplate,t.attrName,e),m=this.getScreenLabelSuffix(),b=p(),d=p("Unit"+m),g=["Top","Right","Bottom","Left"],f=()=>{const e=this.getAttributeValue(d)||"px";return R(e)},h="margin"===t.attrName.toLowerCase()||t.allowNegativeValues?-1*(f()?n:i):f()?r:s;return t.onChange=(e,t)=>{f()?this.setAttributeValue(p(t),M(e),m):this.setAttributeValue(p(`${t}Decimal`),M(e,"decimal"),m)},t.getValue=e=>{let t;return t=f()?""!==this.getAttributeValue(p(e),m)?parseInt(this.getAttributeValue(p(e),m),10):"":""!==this.getAttributeValue(p(`${e}Decimal`),m)?parseFloat(this.getAttributeValue(p(`${e}Decimal`),m)):"",t},t.getPlaceholderValue=e=>{let t="";return"Tablet"===m?t=f()?""!==this.getAttributeValue(p(e))?parseInt(this.getAttributeValue(p(e)),10):"":""!==this.getAttributeValue(p(`${e}Decimal`))?parseFloat(this.getAttributeValue(p(`${e}Decimal`))):"":"Mobile"===m&&(f()?""!==this.getAttributeValue(p(e),"Tablet")?t=parseInt(this.getAttributeValue(p(e),"Tablet"),10):""!==this.getAttributeValue(p(e))&&(t=parseInt(this.getAttributeValue(p(e)),10)):""!==this.getAttributeValue(p(`${e}Decimal`),"Tablet")?t=parseInt(this.getAttributeValue(p(`${e}Decimal`),"Tablet"),10):""!==this.getAttributeValue(p(`${e}Decimal`))&&(t=parseInt(this.getAttributeValue(p(`${e}Decimal`)),10))),t},t.getRangeValue=()=>{let e="";return[...g].some(l=>{t.disableDirections.includes(l)||(e=t.getValue(l))}),e},t.onRangeChange=e=>{[...g].map(l=>{t.disableDirections.length>0&&t.disableDirections.includes(l)?t.onChange("",l):t.onChange(e,l)})},t.onChangeScreen=e=>{this.setState({screen:e})},t.onLinkInputs=e=>{e.preventDefault(),this.state.linkedInputs||[...g].map(e=>{t.disableDirections.length>0&&t.disableDirections.includes(e)?t.onChange("",e):t.onChange(t.getValue("Top"),e)}),this.setState({linkedInputs:!this.state.linkedInputs})},t.onChangeUnit=e=>{e.preventDefault();const t=u?200:0,l=e.target.getAttribute("data-unit"),a=this.getAttributeValue(d)||"px";this.setAttributeValue(d,l),setTimeout(()=>{l!==a&&[...g].map(e=>{const t=b+e,n=`${t}Decimal`;let r=t+m,o=n+m;"px"!==l&&(r=n+m),"px"===a&&(o=t+m,this.setAttributeValue(o,"")),this.setAttributeValue(r,this.getAttributeValue(o))})},t)},wp.element.createElement(y.BaseControl,{className:"qodef-input-control"},wp.element.createElement("div",{className:"qodef-control-heading"},a?wp.element.createElement("div",{className:"qodef-input-control-screens"},wp.element.createElement(Se,{label:l,onChangeScreen:t.onChangeScreen})):wp.element.createElement("label",{className:"qodef-option-label"},l),t.allowUnitControl&&wp.element.createElement(we,{unitType:t.unitType,unitValue:this.getAttributeValue(d),onChangeUnit:t.onChangeUnit}),t.allowLinkedControl&&wp.element.createElement(y.Button,{icon:this.state.linkedInputs?"editor-unlink":"admin-links",onClick:t.onLinkInputs,className:"qodef-link-inputs-button "+(this.state.linkedInputs?"linked":"unlinked")})),this.state.linkedInputs?wp.element.createElement(y.RangeControl,{min:r,max:f()?n:i,step:f()?o:c,onChange:t.onRangeChange,allowReset:!0,value:t.getRangeValue()}):wp.element.createElement("ul",null,[...g].map((l,a)=>wp.element.createElement("li",{className:"qodef-input-control-item",key:a},t.disableDirections.length>0&&t.disableDirections.includes(l)?wp.element.createElement("div",{className:"components-base-control__field"},wp.element.createElement("label",null,(0,e.__)(l,"qi-blocks")),wp.element.createElement("input",{className:"components-text-control__input",type:"text",disabled:!0,value:(0,e.__)("auto","qi-blocks")})):wp.element.createElement(y.TextControl,{type:"number",value:t.getValue(l),placeholder:t.getPlaceholderValue(l),onChange:e=>t.onChange(e,l),label:(0,e.__)(l,"qi-blocks"),min:h,max:f()?n:i,step:f()?o:c})))))}}Ee.defaultProps={label:"",attrNameTemplate:"",attrName:"",blockAttributes:{},setAttributes:()=>{},unitType:"space",allowScreens:!0,allowNegativeValues:!1,disableDirections:[],allowUnitControl:!0,allowLinkedControl:!0,rangeMax:600,rangeMin:0,rangeStep:1,rangeDecimalMax:100,rangeDecimalMin:0,rangeDecimalStep:.01,repeater:!1,repeaterItemIndex:0,repeaterItemKey:"",repeaterSetAttributes:()=>{},repeaterGetAttributes:()=>{}};const qe=Ee;class Ie extends ke.Component{constructor(){super(...arguments),this.state={screen:v()}}getScreenLabelSuffix(){return V(this.state.screen)}getAttributeValue(e,t=this.getScreenLabelSuffix()){const{blockAttributes:l,repeater:a,repeaterItemIndex:n,repeaterItemKey:r,repeaterGetAttributes:o}=this.props;let i=e;t&&(i=e+t);let s=l[i];return a&&(s=o({key:r,childKey:i},n)),U(s)}setAttributeValue(e,t,l=this.getScreenLabelSuffix()){const{setAttributes:a,setCustomEventOnChange:n,repeater:r,repeaterItemIndex:o,repeaterItemKey:i,repeaterSetAttributes:s}=this.props;let c=e;l&&(c=e+l),r?s({key:i,childKey:c},t,o):a({[c]:t}),n(t)}render(){const e={...this.props},{label:t,blockAttributeKey:l,selectOptions:a}=e;return e.onChangeScreen=e=>{this.setState({screen:e})},wp.element.createElement(y.BaseControl,{className:"qodef-advanced-select-option"},wp.element.createElement("div",{className:"qodef-advanced-select-heading"},wp.element.createElement(Se,{label:t,onChangeScreen:e.onChangeScreen})),wp.element.createElement(y.SelectControl,{value:this.getAttributeValue(l),options:a,onChange:e=>this.setAttributeValue(l,e)}))}}Ie.defaultProps={label:(0,e.__)("Default Label Text","qi-blocks"),blockAttributes:{},blockAttributeKey:"",setAttributes:()=>{},selectOptions:{},setCustomEventOnChange:()=>{},repeater:!1,repeaterItemIndex:0,repeaterItemKey:"",repeaterSetAttributes:()=>{},repeaterGetAttributes:()=>{}};const xe=Ie,Ce=wp.blob,{entries:Te,setPrototypeOf:Ne,isFrozen:Pe,getPrototypeOf:Be,getOwnPropertyDescriptor:Ve}=Object;let{freeze:Oe,seal:De,create:Re}=Object,{apply:Le,construct:Me}="undefined"!=typeof Reflect&&Reflect;Oe||(Oe=function(e){return e}),De||(De=function(e){return e}),Le||(Le=function(e,t,l){return e.apply(t,l)}),Me||(Me=function(e,t){return new e(...t)});const ze=tt(Array.prototype.forEach),Ue=tt(Array.prototype.lastIndexOf),Fe=tt(Array.prototype.pop),je=tt(Array.prototype.push),He=tt(Array.prototype.splice),Ke=tt(String.prototype.toLowerCase),Ge=tt(String.prototype.toString),$e=tt(String.prototype.match),We=tt(String.prototype.replace),Ye=tt(String.prototype.indexOf),Ze=tt(String.prototype.trim),Xe=tt(Object.prototype.hasOwnProperty),Je=tt(RegExp.prototype.test),Qe=(et=TypeError,function(){for(var e=arguments.length,t=new Array(e),l=0;l<e;l++)t[l]=arguments[l];return Me(et,t)});var et;function tt(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var l=arguments.length,a=new Array(l>1?l-1:0),n=1;n<l;n++)a[n-1]=arguments[n];return Le(e,t,a)}}function lt(e,t){let l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ke;Ne&&Ne(e,null);let a=t.length;for(;a--;){let n=t[a];if("string"==typeof n){const e=l(n);e!==n&&(Pe(t)||(t[a]=e),n=e)}e[n]=!0}return e}function at(e){for(let t=0;t<e.length;t++){Xe(e,t)||(e[t]=null)}return e}function nt(e){const t=Re(null);for(const[l,a]of Te(e)){Xe(e,l)&&(Array.isArray(a)?t[l]=at(a):a&&"object"==typeof a&&a.constructor===Object?t[l]=nt(a):t[l]=a)}return t}function rt(e,t){for(;null!==e;){const l=Ve(e,t);if(l){if(l.get)return tt(l.get);if("function"==typeof l.value)return tt(l.value)}e=Be(e)}return function(){return null}}const ot=Oe(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),it=Oe(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),st=Oe(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),ct=Oe(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),ut=Oe(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),pt=Oe(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),mt=Oe(["#text"]),bt=Oe(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),dt=Oe(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),gt=Oe(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),ft=Oe(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),ht=De(/\{\{[\w\W]*|[\w\W]*\}\}/gm),kt=De(/<%[\w\W]*|[\w\W]*%>/gm),_t=De(/\$\{[\w\W]*/gm),vt=De(/^data-[\-\w.\u00B7-\uFFFF]+$/),yt=De(/^aria-[\-\w]+$/),wt=De(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),At=De(/^(?:\w+script|data):/i),St=De(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Et=De(/^html$/i),qt=De(/^[a-z][.\w]*(-[.\w]+)+$/i);var It=Object.freeze({__proto__:null,ARIA_ATTR:yt,ATTR_WHITESPACE:St,CUSTOM_ELEMENT:qt,DATA_ATTR:vt,DOCTYPE_NAME:Et,ERB_EXPR:kt,IS_ALLOWED_URI:wt,IS_SCRIPT_OR_DATA:At,MUSTACHE_EXPR:ht,TMPLIT_EXPR:_t});const xt=1,Ct=3,Tt=7,Nt=8,Pt=9,Bt=function(){return"undefined"==typeof window?null:window};var Vt=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Bt();const l=t=>e(t);if(l.version="3.2.6",l.removed=[],!t||!t.document||t.document.nodeType!==Pt||!t.Element)return l.isSupported=!1,l;let{document:a}=t;const n=a,r=n.currentScript,{DocumentFragment:o,HTMLTemplateElement:i,Node:s,Element:c,NodeFilter:u,NamedNodeMap:p=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:m,DOMParser:b,trustedTypes:d}=t,g=c.prototype,f=rt(g,"cloneNode"),h=rt(g,"remove"),k=rt(g,"nextSibling"),_=rt(g,"childNodes"),v=rt(g,"parentNode");if("function"==typeof i){const e=a.createElement("template");e.content&&e.content.ownerDocument&&(a=e.content.ownerDocument)}let y,w="";const{implementation:A,createNodeIterator:S,createDocumentFragment:E,getElementsByTagName:q}=a,{importNode:I}=n;let x={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};l.isSupported="function"==typeof Te&&"function"==typeof v&&A&&void 0!==A.createHTMLDocument;const{MUSTACHE_EXPR:C,ERB_EXPR:T,TMPLIT_EXPR:N,DATA_ATTR:P,ARIA_ATTR:B,IS_SCRIPT_OR_DATA:V,ATTR_WHITESPACE:O,CUSTOM_ELEMENT:D}=It;let{IS_ALLOWED_URI:R}=It,L=null;const M=lt({},[...ot,...it,...st,...ut,...mt]);let z=null;const U=lt({},[...bt,...dt,...gt,...ft]);let F=Object.seal(Re(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),j=null,H=null,K=!0,G=!0,$=!1,W=!0,Y=!1,Z=!0,X=!1,J=!1,Q=!1,ee=!1,te=!1,le=!1,ae=!0,ne=!1,re=!0,oe=!1,ie={},se=null;const ce=lt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let ue=null;const pe=lt({},["audio","video","img","source","image","track"]);let me=null;const be=lt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),de="http://www.w3.org/1998/Math/MathML",ge="http://www.w3.org/2000/svg",fe="http://www.w3.org/1999/xhtml";let he=fe,ke=!1,_e=null;const ve=lt({},[de,ge,fe],Ge);let ye=lt({},["mi","mo","mn","ms","mtext"]),we=lt({},["annotation-xml"]);const Ae=lt({},["title","style","font","a","script"]);let Se=null;const Ee=["application/xhtml+xml","text/html"];let qe=null,Ie=null;const xe=a.createElement("form"),Ce=function(e){return e instanceof RegExp||e instanceof Function},Ne=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Ie||Ie!==e){if(e&&"object"==typeof e||(e={}),e=nt(e),Se=-1===Ee.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,qe="application/xhtml+xml"===Se?Ge:Ke,L=Xe(e,"ALLOWED_TAGS")?lt({},e.ALLOWED_TAGS,qe):M,z=Xe(e,"ALLOWED_ATTR")?lt({},e.ALLOWED_ATTR,qe):U,_e=Xe(e,"ALLOWED_NAMESPACES")?lt({},e.ALLOWED_NAMESPACES,Ge):ve,me=Xe(e,"ADD_URI_SAFE_ATTR")?lt(nt(be),e.ADD_URI_SAFE_ATTR,qe):be,ue=Xe(e,"ADD_DATA_URI_TAGS")?lt(nt(pe),e.ADD_DATA_URI_TAGS,qe):pe,se=Xe(e,"FORBID_CONTENTS")?lt({},e.FORBID_CONTENTS,qe):ce,j=Xe(e,"FORBID_TAGS")?lt({},e.FORBID_TAGS,qe):nt({}),H=Xe(e,"FORBID_ATTR")?lt({},e.FORBID_ATTR,qe):nt({}),ie=!!Xe(e,"USE_PROFILES")&&e.USE_PROFILES,K=!1!==e.ALLOW_ARIA_ATTR,G=!1!==e.ALLOW_DATA_ATTR,$=e.ALLOW_UNKNOWN_PROTOCOLS||!1,W=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Y=e.SAFE_FOR_TEMPLATES||!1,Z=!1!==e.SAFE_FOR_XML,X=e.WHOLE_DOCUMENT||!1,ee=e.RETURN_DOM||!1,te=e.RETURN_DOM_FRAGMENT||!1,le=e.RETURN_TRUSTED_TYPE||!1,Q=e.FORCE_BODY||!1,ae=!1!==e.SANITIZE_DOM,ne=e.SANITIZE_NAMED_PROPS||!1,re=!1!==e.KEEP_CONTENT,oe=e.IN_PLACE||!1,R=e.ALLOWED_URI_REGEXP||wt,he=e.NAMESPACE||fe,ye=e.MATHML_TEXT_INTEGRATION_POINTS||ye,we=e.HTML_INTEGRATION_POINTS||we,F=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&Ce(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(F.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Ce(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(F.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(F.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Y&&(G=!1),te&&(ee=!0),ie&&(L=lt({},mt),z=[],!0===ie.html&&(lt(L,ot),lt(z,bt)),!0===ie.svg&&(lt(L,it),lt(z,dt),lt(z,ft)),!0===ie.svgFilters&&(lt(L,st),lt(z,dt),lt(z,ft)),!0===ie.mathMl&&(lt(L,ut),lt(z,gt),lt(z,ft))),e.ADD_TAGS&&(L===M&&(L=nt(L)),lt(L,e.ADD_TAGS,qe)),e.ADD_ATTR&&(z===U&&(z=nt(z)),lt(z,e.ADD_ATTR,qe)),e.ADD_URI_SAFE_ATTR&&lt(me,e.ADD_URI_SAFE_ATTR,qe),e.FORBID_CONTENTS&&(se===ce&&(se=nt(se)),lt(se,e.FORBID_CONTENTS,qe)),re&&(L["#text"]=!0),X&&lt(L,["html","head","body"]),L.table&&(lt(L,["tbody"]),delete j.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw Qe('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw Qe('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');y=e.TRUSTED_TYPES_POLICY,w=y.createHTML("")}else void 0===y&&(y=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let l=null;const a="data-tt-policy-suffix";t&&t.hasAttribute(a)&&(l=t.getAttribute(a));const n="dompurify"+(l?"#"+l:"");try{return e.createPolicy(n,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+n+" could not be created."),null}}(d,r)),null!==y&&"string"==typeof w&&(w=y.createHTML(""));Oe&&Oe(e),Ie=e}},Pe=lt({},[...it,...st,...ct]),Be=lt({},[...ut,...pt]),Ve=function(e){je(l.removed,{element:e});try{v(e).removeChild(e)}catch(t){h(e)}},De=function(e,t){try{je(l.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){je(l.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(ee||te)try{Ve(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},Le=function(e){let t=null,l=null;if(Q)e="<remove></remove>"+e;else{const t=$e(e,/^[\r\n\t ]+/);l=t&&t[0]}"application/xhtml+xml"===Se&&he===fe&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const n=y?y.createHTML(e):e;if(he===fe)try{t=(new b).parseFromString(n,Se)}catch(e){}if(!t||!t.documentElement){t=A.createDocument(he,"template",null);try{t.documentElement.innerHTML=ke?w:n}catch(e){}}const r=t.body||t.documentElement;return e&&l&&r.insertBefore(a.createTextNode(l),r.childNodes[0]||null),he===fe?q.call(t,X?"html":"body")[0]:X?t.documentElement:r},Me=function(e){return S.call(e.ownerDocument||e,e,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},et=function(e){return e instanceof m&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof p)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},tt=function(e){return"function"==typeof s&&e instanceof s};function at(e,t,a){ze(e,e=>{e.call(l,t,a,Ie)})}const ht=function(e){let t=null;if(at(x.beforeSanitizeElements,e,null),et(e))return Ve(e),!0;const a=qe(e.nodeName);if(at(x.uponSanitizeElement,e,{tagName:a,allowedTags:L}),Z&&e.hasChildNodes()&&!tt(e.firstElementChild)&&Je(/<[/\w!]/g,e.innerHTML)&&Je(/<[/\w!]/g,e.textContent))return Ve(e),!0;if(e.nodeType===Tt)return Ve(e),!0;if(Z&&e.nodeType===Nt&&Je(/<[/\w]/g,e.data))return Ve(e),!0;if(!L[a]||j[a]){if(!j[a]&&_t(a)){if(F.tagNameCheck instanceof RegExp&&Je(F.tagNameCheck,a))return!1;if(F.tagNameCheck instanceof Function&&F.tagNameCheck(a))return!1}if(re&&!se[a]){const t=v(e)||e.parentNode,l=_(e)||e.childNodes;if(l&&t){for(let a=l.length-1;a>=0;--a){const n=f(l[a],!0);n.__removalCount=(e.__removalCount||0)+1,t.insertBefore(n,k(e))}}}return Ve(e),!0}return e instanceof c&&!function(e){let t=v(e);t&&t.tagName||(t={namespaceURI:he,tagName:"template"});const l=Ke(e.tagName),a=Ke(t.tagName);return!!_e[e.namespaceURI]&&(e.namespaceURI===ge?t.namespaceURI===fe?"svg"===l:t.namespaceURI===de?"svg"===l&&("annotation-xml"===a||ye[a]):Boolean(Pe[l]):e.namespaceURI===de?t.namespaceURI===fe?"math"===l:t.namespaceURI===ge?"math"===l&&we[a]:Boolean(Be[l]):e.namespaceURI===fe?!(t.namespaceURI===ge&&!we[a])&&!(t.namespaceURI===de&&!ye[a])&&!Be[l]&&(Ae[l]||!Pe[l]):!("application/xhtml+xml"!==Se||!_e[e.namespaceURI]))}(e)?(Ve(e),!0):"noscript"!==a&&"noembed"!==a&&"noframes"!==a||!Je(/<\/no(script|embed|frames)/i,e.innerHTML)?(Y&&e.nodeType===Ct&&(t=e.textContent,ze([C,T,N],e=>{t=We(t,e," ")}),e.textContent!==t&&(je(l.removed,{element:e.cloneNode()}),e.textContent=t)),at(x.afterSanitizeElements,e,null),!1):(Ve(e),!0)},kt=function(e,t,l){if(ae&&("id"===t||"name"===t)&&(l in a||l in xe))return!1;if(G&&!H[t]&&Je(P,t));else if(K&&Je(B,t));else if(!z[t]||H[t]){if(!(_t(e)&&(F.tagNameCheck instanceof RegExp&&Je(F.tagNameCheck,e)||F.tagNameCheck instanceof Function&&F.tagNameCheck(e))&&(F.attributeNameCheck instanceof RegExp&&Je(F.attributeNameCheck,t)||F.attributeNameCheck instanceof Function&&F.attributeNameCheck(t))||"is"===t&&F.allowCustomizedBuiltInElements&&(F.tagNameCheck instanceof RegExp&&Je(F.tagNameCheck,l)||F.tagNameCheck instanceof Function&&F.tagNameCheck(l))))return!1}else if(me[t]);else if(Je(R,We(l,O,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==Ye(l,"data:")||!ue[e]){if($&&!Je(V,We(l,O,"")));else if(l)return!1}else;return!0},_t=function(e){return"annotation-xml"!==e&&$e(e,D)},vt=function(e){at(x.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||et(e))return;const a={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:z,forceKeepAttr:void 0};let n=t.length;for(;n--;){const r=t[n],{name:o,namespaceURI:i,value:s}=r,c=qe(o),u=s;let p="value"===o?u:Ze(u);if(a.attrName=c,a.attrValue=p,a.keepAttr=!0,a.forceKeepAttr=void 0,at(x.uponSanitizeAttribute,e,a),p=a.attrValue,!ne||"id"!==c&&"name"!==c||(De(o,e),p="user-content-"+p),Z&&Je(/((--!?|])>)|<\/(style|title)/i,p)){De(o,e);continue}if(a.forceKeepAttr)continue;if(!a.keepAttr){De(o,e);continue}if(!W&&Je(/\/>/i,p)){De(o,e);continue}Y&&ze([C,T,N],e=>{p=We(p,e," ")});const m=qe(e.nodeName);if(kt(m,c,p)){if(y&&"object"==typeof d&&"function"==typeof d.getAttributeType)if(i);else switch(d.getAttributeType(m,c)){case"TrustedHTML":p=y.createHTML(p);break;case"TrustedScriptURL":p=y.createScriptURL(p)}if(p!==u)try{i?e.setAttributeNS(i,o,p):e.setAttribute(o,p),et(e)?Ve(e):Fe(l.removed)}catch(t){De(o,e)}}else De(o,e)}at(x.afterSanitizeAttributes,e,null)},yt=function e(t){let l=null;const a=Me(t);for(at(x.beforeSanitizeShadowDOM,t,null);l=a.nextNode();)at(x.uponSanitizeShadowNode,l,null),ht(l),vt(l),l.content instanceof o&&e(l.content);at(x.afterSanitizeShadowDOM,t,null)};return l.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=null,r=null,i=null,c=null;if(ke=!e,ke&&(e="\x3c!--\x3e"),"string"!=typeof e&&!tt(e)){if("function"!=typeof e.toString)throw Qe("toString is not a function");if("string"!=typeof(e=e.toString()))throw Qe("dirty is not a string, aborting")}if(!l.isSupported)return e;if(J||Ne(t),l.removed=[],"string"==typeof e&&(oe=!1),oe){if(e.nodeName){const t=qe(e.nodeName);if(!L[t]||j[t])throw Qe("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof s)a=Le("\x3c!----\x3e"),r=a.ownerDocument.importNode(e,!0),r.nodeType===xt&&"BODY"===r.nodeName||"HTML"===r.nodeName?a=r:a.appendChild(r);else{if(!ee&&!Y&&!X&&-1===e.indexOf("<"))return y&&le?y.createHTML(e):e;if(a=Le(e),!a)return ee?null:le?w:""}a&&Q&&Ve(a.firstChild);const u=Me(oe?e:a);for(;i=u.nextNode();)ht(i),vt(i),i.content instanceof o&&yt(i.content);if(oe)return e;if(ee){if(te)for(c=E.call(a.ownerDocument);a.firstChild;)c.appendChild(a.firstChild);else c=a;return(z.shadowroot||z.shadowrootmode)&&(c=I.call(n,c,!0)),c}let p=X?a.outerHTML:a.innerHTML;return X&&L["!doctype"]&&a.ownerDocument&&a.ownerDocument.doctype&&a.ownerDocument.doctype.name&&Je(Et,a.ownerDocument.doctype.name)&&(p="<!DOCTYPE "+a.ownerDocument.doctype.name+">\n"+p),Y&&ze([C,T,N],e=>{p=We(p,e," ")}),y&&le?y.createHTML(p):p},l.setConfig=function(){Ne(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),J=!0},l.clearConfig=function(){Ie=null,J=!1},l.isValidAttribute=function(e,t,l){Ie||Ne({});const a=qe(e),n=qe(t);return kt(a,n,l)},l.addHook=function(e,t){"function"==typeof t&&je(x[e],t)},l.removeHook=function(e,t){if(void 0!==t){const l=Ue(x[e],t);return-1===l?void 0:He(x[e],l,1)[0]}return Fe(x[e])},l.removeHooks=function(e){x[e]=[]},l.removeAllHooks=function(){x={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},l}();class Ot extends ke.Component{constructor(){super(...arguments),this.state={screen:v(),imageId:"",externalImageIsSet:!1,imageSizeNotExist:!1}}getScreenLabelSuffix(){return V(this.state.screen)}getAttributeValue(e=this.getScreenLabelSuffix()){const{blockAttributeKey:t,blockAttributes:l,allowScreens:a,repeater:n,repeaterItemIndex:r,repeaterItemKey:o,isSimpleRepeaterValue:i,repeaterGetAttributes:s}=this.props;let c=t;a&&e&&(c=t+e);let u=l[c];if(n){let l=i?null:t;a&&e&&(l=i?this.state.screen:c),u=s({key:o,childKey:l},r)||{}}return U(u)}setAttributeValue(e){const{blockAttributeKey:t,setAttributes:l,allowScreens:a,repeater:n,repeaterItemIndex:r,repeaterItemKey:o,isSimpleRepeaterValue:i,repeaterSetAttributes:s}=this.props,c=this.getScreenLabelSuffix();let u=t;if(a&&c&&(u=t+c),n){let l=i?null:t;a&&c&&(l=i?this.state.screen:u),s({key:o,childKey:l},e,r)}else l({[u]:e})}componentDidMount(){const{allowScreens:e,allowDefaultImage:t}=this.props,{url:l,id:a,defaultValueIsSet:n}=this.getAttributeValue("");if(l&&!l.includes(qiBlocksEditor.vars.siteURL))this.onSelectURL(l),this.setState({externalImageIsSet:!0});else{a&&(this.setState({imageId:a}),this.updateImageSizeOption(a)),!t||n||l||a||(this.setAttributeValue({id:null,url:qiBlocksEditor.vars.defaultImage,alt:qiBlocksEditor.vars.defaultImagePlaceholder,caption:"",width:1200,height:800,custom_image_size:"",html:""}),this.setState({defaultImageIsSet:!0}));const r=[""];e&&(r.push("Tablet"),r.push("Mobile")),r.map(e=>{const{url:t,id:l}=this.getAttributeValue(e);t&&(0,Ce.isBlobURL)(t)&&!l&&this.setAttributeValue({url:"",alt:"",caption:"",width:"",height:"",html:""})})}}setSVGIcon=(e,t,l,a)=>{const n=new XMLHttpRequest;null!=n&&(n.open("GET",t,!0),n.onreadystatechange=()=>{4===n.readyState&&200===n.status&&this.setAttributeValue({id:e,url:t,alt:l,caption:a,html:Vt.sanitize(n.responseText,{USE_PROFILES:{svg:!0,svgFilters:!0}})})},n.send())};onSelectImage=({id:e,url:t,alt:l,caption:a,width:n,height:r})=>{t.includes(".svg")?this.setSVGIcon(e,t,l,a):this.setAttributeValue({id:e,url:t,alt:l,caption:a,width:n,height:r}),this.setState({imageId:e,externalImageIsSet:!1}),this.updateImageSizeOption(e)};updateImageSizeOption=e=>{if(this.props.allowImageSizes){const t=setInterval(()=>{(0,o.select)("core").getMedia(e)&&(clearInterval(t),this.forceUpdate())},1e3)}};onSelectURL=e=>{e.includes(".svg")?this.setSVGIcon(null,e,"",""):this.setAttributeValue({id:null,url:e,alt:"",caption:"",width:"",height:"",html:""}),this.setState({externalImageIsSet:!1})};onUploadError=e=>{const{noticeOperations:t}=this.props;t.createErrorNotice(e)};removeImage=()=>{this.setAttributeValue({id:null,url:"",alt:"",caption:"",width:"",height:"",html:"",defaultValueIsSet:!!this.props.allowDefaultImage})};onImageSizeChange=e=>{const{customImageSizes:t}=this.props,l=(0,o.select)("core").getMedia(this.state.imageId);if(l){let a=e;t&&t.length>1&&(a=this.getImageURLbySize(e)||l.source_url),"custom"===e&&(a=l.source_url),this.setAttributeValue({id:l.id,url:a,alt:l.alt_text||"",caption:l.caption&&l.caption.raw||"",custom_image_size:e})}};getImageURLbySize(e){const t=this.getAttributeValue();let l="";if(t){const a=(0,o.select)("core").getMedia(t.id);if(!a)return"";const n=a.media_details.sizes;if(n&&0===Object.keys(n).length)this.setState({imageSizeNotExist:!0});else{this.setState({imageSizeNotExist:!1});for(const t in n)if(t.includes("qi_blocks_image_size_"+e.replace("-","_"))){l=n[t].source_url;break}}["","custom"].includes(e)&&this.setState({imageSizeNotExist:!1})}return l}getImageSizes(){const{imageSizes:t,customImageSizes:l}=this.props,a=this.getAttributeValue();let n=[];if(a){const r=(0,o.select)("core").getMedia(a.id);if(!r)return[];const i=r.media_details.sizes;if(i&&0===Object.keys(i).length&&n.push({label:(0,e.__)("Default","qi-blocks"),value:""}),l&&l.length>1)l.map(e=>{n.push({label:e.label,value:e.value})});else for(const e in i){const l=i[e],a=t.find(t=>t.slug===e);a&&n.push({label:a.name,value:l.source_url})}}return n}render(){const t={...this.props},l={...this.state},{label:a,help:n,noticeUI:r,allowedTypes:o,allowScreens:i,allowImageSizes:s}=t,c=this.getAttributeValue(),{id:u,url:p,alt:m,html:b}=c;t.onChangeScreen=e=>{this.setState({screen:e}),this.updateImageSizeOption(u)};let d=["qodef-image-option"];return p&&p.includes(".svg")&&d.push("qodef--svg"),wp.element.createElement(y.BaseControl,{className:d.join(" ")},wp.element.createElement("div",{className:"qodef-advanced-select-heading"},i?wp.element.createElement(Se,{label:a,onChangeScreen:t.onChangeScreen}):wp.element.createElement(wp.element.Fragment,null,a&&wp.element.createElement("label",{className:"qodef-option-label"},a))),n&&wp.element.createElement("p",{className:"qodef-option-description"},n),p?wp.element.createElement(wp.element.Fragment,null,wp.element.createElement("div",{className:"qodef-image-option-inner"},(0,Ce.isBlobURL)(p)&&wp.element.createElement("div",{className:"qodef-image-option-spinner"},wp.element.createElement(y.Spinner,null)),wp.element.createElement(fe.MediaUploadCheck,null,wp.element.createElement(fe.MediaUpload,{allowedTypes:o,value:u,onSelect:this.onSelectImage,render:({open:t})=>wp.element.createElement(wp.element.Fragment,null,wp.element.createElement("img",{src:p,alt:m}),wp.element.createElement("div",{className:"qodef-image-option-actions"},wp.element.createElement(y.Button,{icon:"edit",showTooltip:!0,label:(0,e.__)("Edit Image","qi-blocks"),onClick:t}),wp.element.createElement(y.Button,{icon:"trash",showTooltip:!0,label:(0,e.__)("Remove Image","qi-blocks"),onClick:this.removeImage})))}))),l.imageSizeNotExist&&wp.element.createElement("p",{className:"qodef-image-notice"},(0,e.__)("The Image has no predefined sizes, please set a custom image size.","qi-blocks")),l.externalImageIsSet&&wp.element.createElement("p",{className:"qodef-image-notice"},(0,e.__)("External image URL is set, please upload your image for this Element.","qi-blocks"))):wp.element.createElement(fe.MediaPlaceholder,{allowedTypes:o,icon:"format-image",onSelect:this.onSelectImage,onSelectURL:this.onSelectURL,onError:this.onUploadError,notices:r}),s&&u&&!b&&wp.element.createElement("div",{className:"qodef-image-option-sizes"},wp.element.createElement(y.SelectControl,{label:(0,e.__)("Image Size","qi-blocks"),options:this.getImageSizes(),onChange:this.onImageSizeChange,value:void 0!==c.custom_image_size?c.custom_image_size:p})))}}Ot.defaultProps={label:(0,e.__)("Image","qi-blocks"),help:"",blockAttributeKey:"",blockAttributes:{},setAttributes:()=>{},allowedTypes:["image"],allowScreens:!1,allowDefaultImage:!1,allowImageSizes:!1,customImageSizes:[],repeater:!1,repeaterItemIndex:0,repeaterItemKey:"",isSimpleRepeaterValue:!0,repeaterSetAttributes:()=>{},repeaterGetAttributes:()=>{}};const Dt=(0,o.withSelect)(e=>({imageSizes:e("core/block-editor")?.getSettings()?.imageSizes}))((0,y.withNotices)(Ot));class Rt extends ke.Component{constructor(){super(...arguments),this.state={isPickerVisible:!1}}getAttributeValue(){const{defaultColor:e,blockAttributeKey:t,blockAttributes:l,repeater:a,repeaterItemIndex:n,repeaterItemKey:r,isSimpleRepeaterValue:o,repeaterGetAttributes:i}=this.props;let s=l[t];return a&&(s=i({key:r,childKey:o?"":t},n)),s||e}setAttributeValue(e){const{blockAttributeKey:t,setAttributes:l,repeater:a,repeaterItemIndex:n,repeaterItemKey:r,isSimpleRepeaterValue:o,repeaterSetAttributes:i}=this.props;a?i({key:r,childKey:o?"":t},e,n):l({[t]:e})}onChange=e=>{const{r:t,g:l,b:a,a:n}=e.rgb;let r="rgba("+[t,l,a,n].join(",")+")";this.props.setHEXValue&&(r=e.hex),this.setState({colorReset:!0}),this.setAttributeValue(r)};onClick=e=>{e.preventDefault();const t=this;t.setState({isPickerVisible:!this.state.isPickerVisible}),window.addEventListener("click",e=>{const l=document.querySelectorAll(".qodef-color-option.qodef--opened");l.length&&l.forEach(l=>{l.contains(e.target)||t.setState({isPickerVisible:!1})})})};onResetColor=e=>{e.preventDefault(),this.setState({isPickerVisible:!this.state.isPickerVisible}),this.setAttributeValue("")};render(){const{label:t,popup:l}=this.props;return wp.element.createElement(y.BaseControl,{className:"qodef-color-option "+(this.state.isPickerVisible?"qodef--opened":"")},wp.element.createElement("div",{className:"qodef-control-heading"},t&&wp.element.createElement("label",{className:"qodef-option-label"},t),wp.element.createElement(y.Button,{onClick:this.onClick,className:"qodef-color-indicator-button"},wp.element.createElement(y.ColorIndicator,{colorValue:this.getAttributeValue(),className:"qodef-color-indicator"}))),this.state.isPickerVisible&&wp.element.createElement("div",{className:`qodef-color-picker-wrapper ${l&&"qodef--popup"}`},wp.element.createElement(y.ColorPicker,{color:this.getAttributeValue(),onChangeComplete:this.onChange,disableAlpha:this.props.setHEXValue}),wp.element.createElement(y.Button,{onClick:this.onResetColor,isSecondary:!0},(0,e.__)("Reset Color","qi-blocks"))))}}Rt.defaultProps={label:(0,e.__)("Color","qi-blocks"),defaultColor:"#000",setHEXValue:!1,blockAttributeKey:"",blockAttributes:{},setAttributes:()=>{},popup:!0,repeater:!1,repeaterItemIndex:0,repeaterItemKey:"",isSimpleRepeaterValue:!1,repeaterSetAttributes:()=>{},repeaterGetAttributes:()=>{}};const Lt=Rt;class Mt extends ke.Component{getAttributeValue(){const{blockAttributeKey:e,blockAttributes:t,repeater:l,repeaterItemIndex:a,repeaterItemKey:n,repeaterGetAttributes:r}=this.props;let o=t[e];return l&&(o=r({key:n},a)||{}),U(o)}setAttributeValue(e){const{blockAttributeKey:t,setAttributes:l,repeater:a,repeaterItemIndex:n,repeaterItemKey:r,repeaterSetAttributes:o}=this.props;a?o({key:r},e,n):l({[t]:e})}componentDidMount(){const{url:e,id:t}=this.getAttributeValue();e&&(0,Ce.isBlobURL)(e)&&!t&&this.setAttributeValue({url:"",alt:""})}onSelectVideo=({id:e,url:t,alt:l})=>{this.setAttributeValue({id:e,url:t,alt:l})};onSelectURL=e=>{this.setAttributeValue({id:null,url:e,alt:""})};onUploadError=e=>{const{noticeOperations:t}=this.props;t.createErrorNotice(e)};removeVideo=()=>{this.setAttributeValue({id:null,url:"",alt:""})};render(){const t={...this.props},{label:l,description:a,noticeUI:n}=t,{id:r,url:o}=this.getAttributeValue();return wp.element.createElement(y.BaseControl,{className:"qodef-video-option"},l&&wp.element.createElement("label",{className:"qodef-option-label"},l),a&&wp.element.createElement("p",{className:"qodef-option-description"},a),o?wp.element.createElement("div",{className:"qodef-video-option-inner"},(0,Ce.isBlobURL)(o)&&wp.element.createElement("div",{className:"qodef-video-option-spinner"},wp.element.createElement(y.Spinner,null)),wp.element.createElement(fe.MediaUploadCheck,null,wp.element.createElement(fe.MediaUpload,{allowedTypes:["video"],value:r,onSelect:this.onSelectVideo,render:({open:t})=>wp.element.createElement(wp.element.Fragment,null,wp.element.createElement("video",{src:o}),wp.element.createElement("div",{className:"qodef-video-option-actions"},wp.element.createElement(y.Button,{icon:"edit",showTooltip:!0,label:(0,e.__)("Edit Video","qi-blocks"),onClick:t}),wp.element.createElement(y.Button,{icon:"trash",showTooltip:!0,label:(0,e.__)("Remove Video","qi-blocks"),onClick:this.removeVideo})))}))):wp.element.createElement(fe.MediaPlaceholder,{allowedTypes:["video"],icon:"format-video",onSelect:this.onSelectVideo,onSelectURL:this.onSelectURL,onError:this.onUploadError,notices:n}))}}Mt.defaultProps={label:(0,e.__)("Video","qi-blocks"),description:"",blockAttributeKey:"",blockAttributes:{},setAttributes:()=>{},repeater:!1,repeaterItemIndex:0,repeaterItemKey:"",repeaterSetAttributes:()=>{},repeaterGetAttributes:()=>{}};const zt=(0,y.withNotices)(Mt),Ut=qiBlocksEditor.vars.defaultFontSize,Ft=qiBlocksEditor.vars.defaultLineHeight,jt=e=>{const{convertorType:t,value:l,attributeKey:a}=e;let n=1;a.includes("FontSize")||a.includes("fontSize")?n=Ut:(a.includes("LineHeight")||a.includes("lineHeight"))&&(n=Ft);const r=e=>Math.round(parseInt(e,10)/n*100)/100,o=e=>Math.round(parseInt(e,10)/n*100)/100,i=e=>Math.round(parseFloat(e)/n*100),s=e=>Math.round(100*parseInt(e,10)/window.innerWidth),c=e=>Math.round(100*parseInt(e,10)/window.innerHeight),u=e=>Math.round(parseFloat(e)*n),p=e=>Math.round(parseFloat(e)*n/100),m=e=>Math.round(window.innerWidth*parseInt(e,10)/100),b=e=>Math.round(window.innerHeight*parseInt(e,10)/100);let d="";if(""!==l&&""!==a&&""!==t)switch(t){case"pxToEm":d=r(l);break;case"pxToRem":d=o(l);break;case"pxToP":d=i(l);break;case"pxToVw":d=s(l);break;case"pxToVh":d=c(l);break;case"emToPx":d=u(l);break;case"emToRem":case"remToRem":case"vwToVh":case"vhToVw":d=l;break;case"emToP":case"remToP":d=(e=>100*parseFloat(e))(l);break;case"emToVw":case"remToVw":d=(e=>s(u(e)))(l);break;case"emToVh":case"remToVh":d=(e=>c(u(e)))(l);break;case"remToPx":d=(e=>Math.round(parseFloat(e)*n))(l);break;case"pToPx":d=p(l);break;case"pToEm":case"pToRem":d=(e=>parseFloat(e)/100)(l);break;case"pToVw":d=(e=>s(p(e)))(l);break;case"pToVh":d=(e=>c(p(e)))(l);break;case"vwToPx":d=m(l);break;case"vwToEm":d=(e=>r(m(e)))(l);break;case"vwToRem":d=(e=>o(m(e)))(l);break;case"vwToP":d=(e=>i(m(e)))(l);break;case"vhToPx":d=b(l);break;case"vhToEm":d=(e=>r(b(e)))(l);break;case"vhToRem":d=(e=>o(b(e)))(l);break;case"vhToP":d=(e=>i(b(e)))(l)}return d};jt.defaultProps={convertorType:"pxToEm"};const Ht=jt;class Kt extends ke.Component{constructor(){super(...arguments),this.state={screen:v()}}getScreenLabelSuffix(e){const t=e||this.state.screen;return V(t)}getAttributeValue(e,t=""){const{blockAttributes:l,allowScreens:a,repeater:n,repeaterItemIndex:r,repeaterItemKey:o,repeaterGetAttributes:i}=this.props;let s=e;a&&t&&(s=e+t);let c=l[s];return n&&(c=i({key:o,childKey:s},r)),U(c)}setAttributeValue(e,t,l=this.getScreenLabelSuffix()){const{setAttributes:a,allowScreens:n,repeater:r,repeaterItemIndex:o,repeaterItemKey:i,repeaterSetAttributes:s}=this.props;let c=e;n&&l&&(c=e+l),r?s({key:i,childKey:c},t,o):a({[c]:t})}onChangeUnitsValues(e,t,l,a){const n={...this.props},{rangeMax:r,rangeDecimalMax:o,allowUnitsConvertor:i}=n;let s=this.getAttributeValue(t);const c=s;a?(s=parseInt(s,10),s>r&&(s=r)):!a&&s>o&&(s=o),i?["emToRem","remToEm","vwToVh","vhToVw"].includes(l)||(this.setAttributeValue(e,Ht({convertorType:l,value:c,attributeKey:t}),""),this.setAttributeValue(t,"","")):(this.setAttributeValue(e,s,""),this.setAttributeValue(t,"",""))}render(){const e={...this.props},{label:t,unitType:l,blockAttributeKey:a,rangeMax:n,rangeMin:r,rangeStep:o,rangeDecimalMax:i,rangeDecimalMin:s,rangeDecimalStep:c,optionType:u,allowReset:p,allowScreens:m,allowUnits:b,repeater:d,repeaterItemKey:g,isSimpleRepeaterValue:f}=e,h=this.getScreenLabelSuffix();let k=d&&!f?g:a;const _=`${k}Decimal`,v=`${k}Unit`,w=`${k}Tablet`,A=`${_}Tablet`,S=`${v}Tablet`,E=`${k}Mobile`,q=`${_}Mobile`,I=`${v}Mobile`;return e.onChangeScreen=e=>{this.setState({screen:e})},e.onChangeUnit=e=>{e.preventDefault();const t=d?200:0,l=e.target.getAttribute("data-unit"),a=this.getAttributeValue(v,h)||"px";this.setAttributeValue(v,l),setTimeout(()=>{if(l!==a){const e=`${a}To${B(l)}`;let t=k+h,n=_+h;"px"!==l&&(t=_+h,n=k+h),this.onChangeUnitsValues(t,n,e,"px"===l)}},t)},e.onChange=t=>{this.setAttributeValue(k,t),e.setCustomEventOnChange()},e.onChangeDecimal=t=>{let l=0;"decimal"===u&&void 0===t&&(l=200),setTimeout(()=>{this.setAttributeValue(_,t),e.setCustomEventOnChange()},l)},e.getPlaceholderValue=e=>{let t="";const l=this.getAttributeValue(k),a=this.getAttributeValue(_),n=this.getAttributeValue(w),r=this.getAttributeValue(A);return"Tablet"===h?e&&""===n?t=l:e||""!==r||(t=a):"Mobile"===h&&(e&&""===this.getAttributeValue(E)?t=""!==n?n:l:e||""!==this.getAttributeValue(q)||(t=""!==r?r:a)),t},wp.element.createElement(y.BaseControl,{className:"qodef-advanced-range-option"},wp.element.createElement("div",{className:"qodef-advanced-range-heading"},m?wp.element.createElement(Se,{label:t,onChangeScreen:e.onChangeScreen}):wp.element.createElement("label",{className:"qodef-option-label"},t),b&&wp.element.createElement(we,{unitType:l,unitValue:this.getAttributeValue(v,h),onChangeUnit:e.onChangeUnit})),"desktop"===this.state.screen&&wp.element.createElement(wp.element.Fragment,null,(R(this.getAttributeValue(v))&&"decimal"!==u||!b&&"integer"===u)&&wp.element.createElement(y.RangeControl,{min:r,max:n,step:o,value:this.getAttributeValue(k),onChange:e.onChange,allowReset:p}),(L(this.getAttributeValue(v))||!b&&"decimal"===u)&&wp.element.createElement(y.RangeControl,{min:s,max:i,step:c,value:this.getAttributeValue(_),onChange:e.onChangeDecimal,allowReset:p})),"tablet"===this.state.screen&&wp.element.createElement(wp.element.Fragment,null,(R(this.getAttributeValue(S))&&"decimal"!==u||!b&&"integer"===u)&&wp.element.createElement(y.RangeControl,{min:r,max:n,step:o,value:this.getAttributeValue(w),afterIcon:e.getPlaceholderValue(!0),onChange:e.onChange,allowReset:p}),(L(this.getAttributeValue(S))||!b&&"decimal"===u)&&wp.element.createElement(y.RangeControl,{min:s,max:i,step:c,value:this.getAttributeValue(A),afterIcon:e.getPlaceholderValue(!1),onChange:e.onChangeDecimal,allowReset:p})),"mobile"===this.state.screen&&wp.element.createElement(wp.element.Fragment,null,(R(this.getAttributeValue(I))&&"decimal"!==u||!b&&"integer"===u)&&wp.element.createElement(y.RangeControl,{min:r,max:n,step:o,value:this.getAttributeValue(E),afterIcon:e.getPlaceholderValue(!0),onChange:e.onChange,allowReset:p}),(L(this.getAttributeValue(I))||!b&&"decimal"===u)&&wp.element.createElement(y.RangeControl,{min:s,max:i,step:c,value:this.getAttributeValue(q),afterIcon:e.getPlaceholderValue(!1),onChange:e.onChangeDecimal,allowReset:p})))}}Kt.defaultProps={label:(0,e.__)("Default Label Text","qi-blocks"),unitType:"typography",blockAttributes:{},blockAttributeKey:"",setAttributes:()=>{},rangeMax:300,rangeMin:0,rangeStep:1,rangeDecimalMax:10,rangeDecimalMin:0,rangeDecimalStep:.01,optionType:"integer",allowReset:!0,screens:k,allowScreens:!1,allowUnits:!0,allowUnitsConvertor:!1,setCustomEventOnChange:()=>{},repeater:!1,repeaterItemIndex:0,repeaterItemKey:"",isSimpleRepeaterValue:!1,repeaterSetAttributes:()=>{},repeaterGetAttributes:()=>{}};const Gt=Kt,$t=t=>{const l={...t},{attrNameTemplate:a,attrName:n,blockAttributes:r,setAttributes:o,repeater:i,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:p,previewScreen:m}=l,b=n||"Background",d=e=>P(a,b+e);l.getAttributeValue=(e,t="")=>{let l=e;t&&(l=e+t);let a=r[l];return i&&(a=p({key:c,childKey:l},s)),U(a)},l.setAttributeValue=(e,t,l="")=>{let a=e;l&&(a=e+l),i?u({key:c,childKey:a},t,s):o({[a]:t})};let g=V(m||v());return wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(Dt,{label:(0,e.__)(`${b} Image`,"qi-blocks"),blockAttributeKey:d("Image"),blockAttributes:r,setAttributes:o,allowScreens:!0,repeater:i,repeaterItemIndex:s,repeaterItemKey:c,isSimpleRepeaterValue:!1,repeaterSetAttributes:u,repeaterGetAttributes:p}),l.getAttributeValue(d("Image"))&&l.getAttributeValue(d("Image")).url&&wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(xe,{label:(0,e.__)(`${b} Position`,"qi-blocks"),blockAttributeKey:d("Position"),blockAttributes:r,setAttributes:o,selectOptions:F("background_position",!0,[{value:"custom",label:(0,e.__)("Custom","qi-blocks")}]),repeater:i,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:p}),(""===g&&"custom"===l.getAttributeValue(d("Position"))||""!==g&&"custom"===l.getAttributeValue(d("Position"),g)||""!==g&&"custom"===l.getAttributeValue(d("Position"))&&["","custom"].includes(l.getAttributeValue(d("Position"),"Tablet"))&&""===l.getAttributeValue(d("Position"),g))&&wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(Gt,{label:(0,e.__)("X Position","qi-blocks"),blockAttributeKey:d("XPosition"),setAttributes:o,blockAttributes:r,rangeMax:800,rangeMin:-800,rangeDecimalMax:100,rangeDecimalMin:-100,unitType:"xPosition",allowScreens:!0,repeater:i,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:p}),wp.element.createElement(Gt,{label:(0,e.__)("Y Position","qi-blocks"),blockAttributeKey:d("YPosition"),setAttributes:o,blockAttributes:r,rangeMax:800,rangeMin:-800,rangeDecimalMax:100,rangeDecimalMin:-100,unitType:"yPosition",allowScreens:!0,repeater:i,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:p})),wp.element.createElement(y.SelectControl,{label:(0,e.__)(`${b} Attachment`,"qi-blocks"),value:l.getAttributeValue(d("Attachment")),options:F("background_attachment")||"",onChange:e=>l.setAttributeValue(d("Attachment"),e)}),wp.element.createElement(xe,{label:(0,e.__)(`${b} Repeat`,"qi-blocks"),blockAttributeKey:d("Repeat"),blockAttributes:r,setAttributes:o,selectOptions:F("background_repeat"),repeater:i,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:p}),wp.element.createElement(xe,{label:(0,e.__)(`${b} Size`,"qi-blocks"),blockAttributeKey:d("Size"),blockAttributes:r,setAttributes:o,selectOptions:F("background_size",!0,[{value:"custom",label:(0,e.__)("Custom","qi-blocks")}]),repeater:i,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:p}),"custom"===l.getAttributeValue(d("Size"),g)&&wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(Gt,{label:(0,e.__)("Custom Width","qi-blocks"),blockAttributeKey:d("SizeWidth"),setAttributes:o,blockAttributes:r,rangeMax:1e3,rangeMin:0,rangeDecimalMax:100,rangeDecimalMin:0,unitType:"xPosition",allowScreens:!0,repeater:i,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:p}))))};$t.defaultProps={attrNameTemplate:"",attrName:"Background",blockAttributes:{},setAttributes:()=>{},repeater:!1,repeaterItemIndex:0,repeaterItemKey:"",repeaterSetAttributes:()=>{},repeaterGetAttributes:()=>{},previewScreen:""};const Wt=$t,Yt=t=>{const l={...t},{attrNameTemplate:a,blockAttributes:n,setAttributes:r,includeVideoBG:o,repeater:i,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:p,previewScreen:m}=l,b=e=>P(a,e);l.getAttributeValue=(e,t="")=>{let l=n[e];if(i){let a=e;t&&(a=e+t),l=p({key:c,childKey:a},s)}return U(l)},l.setAttributeValue=(e,t,l="")=>{if(i){let a=e;l&&(a=e+l),u({key:c,childKey:a},t,s)}else r({[e+l]:t})};const d=[{label:(0,e.__)("Classic","qi-blocks"),value:""},{label:(0,e.__)("Gradient","qi-blocks"),value:"gradient"}];return o&&d.push({label:(0,e.__)("Video","qi-blocks"),value:"video"}),wp.element.createElement("div",{className:"qodef-background-panel"},wp.element.createElement(y.SelectControl,{label:(0,e.__)("Background Type","qi-blocks"),value:l.getAttributeValue(b("BackgroundType")),options:d,onChange:e=>l.setAttributeValue(b("BackgroundType"),e)}),""===l.getAttributeValue(b("BackgroundType"))&&wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(Lt,{label:(0,e.__)("Background Color","qi-blocks"),blockAttributeKey:b("BackgroundColor"),blockAttributes:n,setAttributes:r,repeater:i,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:p}),wp.element.createElement(Wt,{attrNameTemplate:a,blockAttributes:n,setAttributes:r,repeater:i,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:p,previewScreen:m})),"gradient"===l.getAttributeValue(b("BackgroundType"))&&wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(Lt,{label:(0,e.__)("First Color","qi-blocks"),blockAttributeKey:b("BackgroundGradientColor1"),blockAttributes:n,setAttributes:r,repeater:i,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:p}),wp.element.createElement(y.RangeControl,{label:(0,e.__)("Location","qi-blocks"),value:l.getAttributeValue(b("BackgroundGradientLocation1")),onChange:e=>l.setAttributeValue(b("BackgroundGradientLocation1"),e),min:0,max:100,step:1}),wp.element.createElement(Lt,{label:(0,e.__)("Second Color","qi-blocks"),blockAttributeKey:b("BackgroundGradientColor2"),blockAttributes:n,setAttributes:r,repeater:i,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:p}),wp.element.createElement(y.RangeControl,{label:(0,e.__)("Location","qi-blocks"),value:l.getAttributeValue(b("BackgroundGradientLocation2")),onChange:e=>l.setAttributeValue(b("BackgroundGradientLocation2"),e),min:0,max:100,step:1}),wp.element.createElement(y.SelectControl,{label:(0,e.__)("Gradient Type","qi-blocks"),value:l.getAttributeValue(b("BackgroundGradientType")),options:[{label:(0,e.__)("Linear","qi-blocks"),value:"linear"},{label:(0,e.__)("Radial","qi-blocks"),value:"radial"}],onChange:e=>l.setAttributeValue(b("BackgroundGradientType"),e)}),"linear"===l.getAttributeValue(b("BackgroundGradientType"))&&wp.element.createElement(y.RangeControl,{label:(0,e.__)("Angle","qi-blocks"),value:l.getAttributeValue(b("BackgroundGradientTypeAngle")),onChange:e=>l.setAttributeValue(b("BackgroundGradientTypeAngle"),e),min:0,max:360,step:1}),"radial"===l.getAttributeValue(b("BackgroundGradientType"))&&wp.element.createElement(y.SelectControl,{label:(0,e.__)("Position","qi-blocks"),value:l.getAttributeValue(b("BackgroundGradientTypePosition")),options:F("background_position",!1),onChange:e=>l.setAttributeValue(b("BackgroundGradientTypePosition"),e)})),"video"===l.getAttributeValue(b("BackgroundType"))&&wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(zt,{label:(0,e.__)("Video Link","qi-blocks"),description:(0,e.__)("Self hosted video file (mp4 is recommended)","qi-blocks"),blockAttributeKey:b("BackgroundVideoLink"),blockAttributes:n,setAttributes:r,repeater:i,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:p}),wp.element.createElement(y.TextControl,{type:"number",label:(0,e.__)("Start Time","qi-blocks"),help:(0,e.__)("Specify a start time (in seconds)","qi-blocks"),value:l.getAttributeValue(b("BackgroundVideoStartTime")),onChange:e=>l.setAttributeValue(b("BackgroundVideoStartTime"),M(e))}),wp.element.createElement(y.TextControl,{type:"number",label:(0,e.__)("End Time","qi-blocks"),help:(0,e.__)("Specify an end time (in seconds)","qi-blocks"),value:l.getAttributeValue(b("BackgroundVideoEndTime")),onChange:e=>l.setAttributeValue(b("BackgroundVideoEndTime"),M(e))}),wp.element.createElement(A,{label:(0,e.__)("Play Once","qi-blocks"),blockAttributeKey:b("BackgroundVideoPlayOnce"),blockAttributes:n,setAttributes:r,repeater:i,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:p}),wp.element.createElement(A,{label:(0,e.__)("Play On Mobile","qi-blocks"),blockAttributeKey:b("BackgroundVideoPlayOnMobile"),blockAttributes:n,setAttributes:r,repeater:i,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:p}),wp.element.createElement(Dt,{label:(0,e.__)("Background Fallback","qi-blocks"),blockAttributeKey:b("BackgroundVideoFallbackImage"),blockAttributes:n,setAttributes:r,repeater:i,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:p})))};Yt.defaultProps={attrNameTemplate:"",blockAttributes:{},setAttributes:()=>{},includeVideoBG:!1,repeater:!1,repeaterItemIndex:0,repeaterItemKey:"",repeaterSetAttributes:()=>{},repeaterGetAttributes:()=>{},previewScreen:""};const Zt=Yt,Xt=t=>{const l={...t},{attrNameTemplate:a,blockAttributes:n,setAttributes:r,disableWidthDirections:o,repeater:i,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:p}=l,m=e=>P(a,e);return l.getAttributeValue=(e,t="")=>{let l=n[e];if(i){let a=e;t&&(a=e+t),l=p({key:c,childKey:a},s)}return U(l)},l.setAttributeValue=(e,t,l="")=>{if(i){let a=e;l&&(a=e+l),u({key:c,childKey:a},t,s)}else r({[e+l]:t})},wp.element.createElement("div",{className:"qodef-border-panel"},wp.element.createElement(y.SelectControl,{label:(0,e.__)("Border Type","qi-blocks"),value:l.getAttributeValue(m("BorderStyle")),options:[{label:(0,e.__)("Default","qi-blocks"),value:""},{label:(0,e.__)("None","qi-blocks"),value:"none"},{label:(0,e.__)("Double","qi-blocks"),value:"double"},{label:(0,e.__)("Groove","qi-blocks"),value:"groove"},...F("border_style",!1)],onChange:e=>l.setAttributeValue(m("BorderStyle"),e)}),!["","none"].includes(n[m("BorderStyle")])&&wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(qe,{label:(0,e.__)("Border Width","qi-blocks"),attrName:m("BorderWidth"),blockAttributes:n,setAttributes:r,allowUnitControl:!1,disableDirections:o,rangeMax:20,repeater:i,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:p}),(l.allowBorderColor??!0)&&wp.element.createElement(Lt,{label:(0,e.__)("Border Color","qi-blocks"),blockAttributeKey:m("BorderColor"),blockAttributes:n,setAttributes:r,repeater:i,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:p})),(l.allowBorderRadius??!0)&&wp.element.createElement(qe,{label:(0,e.__)("Border Radius","qi-blocks"),attrName:m("BorderRadius"),blockAttributes:n,setAttributes:r,unitType:"pxAndPercent",repeater:i,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:p}))};Xt.defaultProps={attrNameTemplate:"",blockAttributes:{},setAttributes:()=>{},allowBorderColor:!0,allowBorderRadius:!0,disableWidthDirections:[],repeater:!1,repeaterItemIndex:0,repeaterItemKey:"",repeaterSetAttributes:()=>{},repeaterGetAttributes:()=>{}};const Jt=Xt,Qt=t=>{const l={...t},{attrNameTemplate:a,blockAttributes:n,setAttributes:r,excludeOptions:o}=l,i=e=>P(a,e),[s,c]=(0,ke.useState)(!1);let u=["qodef-box-shadow-panel"];return l.popup&&u.push("qodef--has-popup"),s&&u.push("qodef--opened"),l.onClick=()=>{c(e=>!e),window.addEventListener("click",e=>{const t=document.querySelectorAll(".qodef-box-shadow-panel.qodef--opened");t.length&&t.forEach(t=>{t.contains(e.target)||c(!1)})})},wp.element.createElement("div",{className:u.join(" ")},wp.element.createElement("div",{className:"qodef-box-shadow-panel-heading"},l.label&&wp.element.createElement("label",{className:"qodef-option-label"},l.label),l.popup&&wp.element.createElement(y.Button,{icon:"edit",showTooltip:!0,label:(0,e.__)("Open Panel","qi-blocks"),onClick:l.onClick})),wp.element.createElement("div",{className:"qodef-box-shadow-panel-content"},wp.element.createElement(Lt,{label:(0,e.__)("Color","qi-blocks"),blockAttributeKey:i("BoxShadowColor"),blockAttributes:n,setAttributes:r,popup:!1}),wp.element.createElement(y.RangeControl,{label:(0,e.__)("Horizontal","qi-blocks"),value:n[i("BoxShadowHorizontal")],onChange:e=>r({[i("BoxShadowHorizontal")]:e}),min:-100,max:100,step:1,allowReset:!0}),wp.element.createElement(y.RangeControl,{label:(0,e.__)("Vertical","qi-blocks"),value:n[i("BoxShadowVertical")],onChange:e=>r({[i("BoxShadowVertical")]:e}),min:-100,max:100,step:1,allowReset:!0}),wp.element.createElement(y.RangeControl,{label:(0,e.__)("Blur","qi-blocks"),value:n[i("BoxShadowBlur")],onChange:e=>r({[i("BoxShadowBlur")]:e}),min:0,max:100,step:1,allowReset:!0}),wp.element.createElement(y.RangeControl,{label:(0,e.__)("Spread","qi-blocks"),value:n[i("BoxShadowSpread")],onChange:e=>r({[i("BoxShadowSpread")]:e}),min:-100,max:100,step:1,allowReset:!0}),(p="position",!(o&&o.length&&o.includes(p))&&wp.element.createElement(y.SelectControl,{label:(0,e.__)("Position","qi-blocks"),value:n[i("BoxShadowPosition")],options:[{label:(0,e.__)("Outline","qi-blocks"),value:""},{label:(0,e.__)("Inset","qi-blocks"),value:"inset"}],onChange:e=>r({[i("BoxShadowPosition")]:e})}))));var p};Qt.defaultProps={label:(0,e.__)("Box Shadow","qi-blocks"),attrNameTemplate:"",blockAttributes:{},setAttributes:()=>{},excludeOptions:[],popup:!1};const el=Qt;class tl extends ke.Component{render(){const{blockAttributes:t,setAttributes:l,excludePanels:a,previewScreen:n,blockName:r}=this.props,o=(e,t="")=>P("",e,t),i=["advanced","motion-effects","background","border","positioning","responsive"];a&&a.length&&a.forEach(e=>{i.splice(i.indexOf(e),1)});let s=V(n);return wp.element.createElement("div",{className:"qodef-advanced-panel"},i.includes("advanced")&&wp.element.createElement(y.PanelBody,{title:(0,e.__)("Advanced","qi-blocks")},wp.element.createElement(qe,{label:(0,e.__)("Margin","qi-blocks"),attrName:o("Margin"),blockAttributes:t,setAttributes:l}),wp.element.createElement(qe,{label:(0,e.__)("Padding","qi-blocks"),attrName:o("Padding"),blockAttributes:t,setAttributes:l}),wp.element.createElement(y.TextControl,{type:"number",label:(0,e.__)("Z-Index","qi-blocks"),value:t[o("zIndex")],onChange:e=>l({[o("zIndex")]:M(e)})}),wp.element.createElement(y.TextControl,{label:(0,e.__)("CSS ID","qi-blocks"),value:t[o("cssId")],onChange:e=>l({[o("cssId")]:e})}),wp.element.createElement(y.TextControl,{label:(0,e.__)("CSS Classes","qi-blocks"),value:t[o("cssClasses")],onChange:e=>l({[o("cssClasses")]:e})})),i.includes("motion-effects")&&wp.element.createElement(y.PanelBody,{title:(0,e.__)("Motion Effects","qi-blocks"),initialOpen:!1},wp.element.createElement(y.SelectControl,{label:(0,e.__)("Entrance Animation","qi-blocks"),value:t[o("EntranceAnimation")],options:[{label:(0,e.__)("None","qi-blocks"),value:""},{label:(0,e.__)("Back In Down","qi-blocks"),value:"backInDown"},{label:(0,e.__)("Back In Left","qi-blocks"),value:"backInLeft"},{label:(0,e.__)("Back In Right","qi-blocks"),value:"backInRight"},{label:(0,e.__)("Back In Up","qi-blocks"),value:"backInUp"},{label:(0,e.__)("Bounce","qi-blocks"),value:"bounce"},{label:(0,e.__)("Bounce In","qi-blocks"),value:"bounceIn"},{label:(0,e.__)("Bounce In Down","qi-blocks"),value:"bounceInDown"},{label:(0,e.__)("Bounce In Left","qi-blocks"),value:"bounceInLeft"},{label:(0,e.__)("Bounce In Right","qi-blocks"),value:"bounceInRight"},{label:(0,e.__)("Bounce In Up","qi-blocks"),value:"bounceInUp"},{label:(0,e.__)("Fade In","qi-blocks"),value:"fadeIn"},{label:(0,e.__)("Fade In Down","qi-blocks"),value:"fadeInDown"},{label:(0,e.__)("Fade In Down Big","qi-blocks"),value:"fadeInDownBig"},{label:(0,e.__)("Fade In Left","qi-blocks"),value:"fadeInLeft"},{label:(0,e.__)("Fade In Left Big","qi-blocks"),value:"fadeInLeftBig"},{label:(0,e.__)("Fade In Right","qi-blocks"),value:"fadeInRight"},{label:(0,e.__)("Fade In Right Big","qi-blocks"),value:"fadeInRightBig"},{label:(0,e.__)("Fade In Up","qi-blocks"),value:"fadeInUp"},{label:(0,e.__)("Fade In Up Big","qi-blocks"),value:"fadeInUpBig"},{label:(0,e.__)("Fade In Top Left","qi-blocks"),value:"fadeInTopLeft"},{label:(0,e.__)("Fade In Top Right","qi-blocks"),value:"fadeInTopRight"},{label:(0,e.__)("Fade In Bottom Left","qi-blocks"),value:"fadeInBottomLeft"},{label:(0,e.__)("Fade In Bottom Right","qi-blocks"),value:"fadeInBottomRight"},{label:(0,e.__)("Flash","qi-blocks"),value:"flash"},{label:(0,e.__)("Flip","qi-blocks"),value:"flip"},{label:(0,e.__)("Flip In X","qi-blocks"),value:"flipInX"},{label:(0,e.__)("Flip In Y","qi-blocks"),value:"flipInY"},{label:(0,e.__)("Head Shake","qi-blocks"),value:"headShake"},{label:(0,e.__)("Heart Beat","qi-blocks"),value:"heartBeat"},{label:(0,e.__)("Jack In The Box","qi-blocks"),value:"jackInTheBox"},{label:(0,e.__)("Jello","qi-blocks"),value:"jello"},{label:(0,e.__)("Light Speed In Right","qi-blocks"),value:"lightSpeedInRight"},{label:(0,e.__)("Light Speed In Left","qi-blocks"),value:"lightSpeedInLeft"},{label:(0,e.__)("Pulse","qi-blocks"),value:"pulse"},{label:(0,e.__)("Roll In","qi-blocks"),value:"rollIn"},{label:(0,e.__)("Rotate In","qi-blocks"),value:"rotateIn"},{label:(0,e.__)("Rotate In Down Left","qi-blocks"),value:"rotateInDownLeft"},{label:(0,e.__)("Rotate In Down Right","qi-blocks"),value:"rotateInDownRight"},{label:(0,e.__)("Rotate In Up Left","qi-blocks"),value:"rotateInUpLeft"},{label:(0,e.__)("Rotate In Up Right","qi-blocks"),value:"rotateInUpRight"},{label:(0,e.__)("Rubber Band","qi-blocks"),value:"rubberBand"},{label:(0,e.__)("Shake X","qi-blocks"),value:"shakeX"},{label:(0,e.__)("Shake Y","qi-blocks"),value:"shakeY"},{label:(0,e.__)("Slide In Down","qi-blocks"),value:"slideInDown"},{label:(0,e.__)("Slide In Left","qi-blocks"),value:"slideInLeft"},{label:(0,e.__)("Slide In Right","qi-blocks"),value:"slideInRight"},{label:(0,e.__)("Slide In Up","qi-blocks"),value:"slideInUp"},{label:(0,e.__)("Swing","qi-blocks"),value:"swing"},{label:(0,e.__)("Tada","qi-blocks"),value:"tada"},{label:(0,e.__)("Wobble","qi-blocks"),value:"wobble"},{label:(0,e.__)("Zoom In","qi-blocks"),value:"zoomIn"},{label:(0,e.__)("Zoom In Down","qi-blocks"),value:"zoomInDown"},{label:(0,e.__)("Zoom In Left","qi-blocks"),value:"zoomInLeft"},{label:(0,e.__)("Zoom In Right","qi-blocks"),value:"zoomInRight"},{label:(0,e.__)("Zoom In Up","qi-blocks"),value:"zoomInUp"}],onChange:e=>{l({[o("EntranceAnimation")]:e}),setTimeout(()=>{qiBlocksEditor.qodefTriggerBlockAnimation.triggerAnimation(t.uniqueClass)},300)}}),void 0!==t[o("EntranceAnimation")]&&""!==t[o("EntranceAnimation")]&&wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(y.SelectControl,{label:(0,e.__)("Animation Duration","qi-blocks"),value:t[o("EntranceAnimationDuration")],options:[{label:(0,e.__)("Slower","qi-blocks"),value:"slower"},{label:(0,e.__)("Slow","qi-blocks"),value:"slow"},{label:(0,e.__)("Normal","qi-blocks"),value:"normal"},{label:(0,e.__)("Fast","qi-blocks"),value:"fast"},{label:(0,e.__)("Faster","qi-blocks"),value:"faster"}],onChange:e=>{l({[o("EntranceAnimationDuration")]:e}),setTimeout(()=>{qiBlocksEditor.qodefTriggerBlockAnimation.triggerAnimation(t.uniqueClass)},300)}}),wp.element.createElement(y.TextControl,{type:"number",label:(0,e.__)("Animation Delay (ms)","qi-blocks"),value:t[o("EntranceAnimationDelay")],min:0,step:100,onChange:e=>{l({[o("EntranceAnimationDelay")]:M(e)}),qiBlocksEditor.qodefTriggerBlockAnimation.triggerAnimation(t.uniqueClass,!0)}}))),i.includes("background")&&wp.element.createElement(y.PanelBody,{title:(0,e.__)("Background","qi-blocks"),initialOpen:!1},wp.element.createElement(Zt,{attrNameTemplate:"Advanced",blockAttributes:t,setAttributes:l,previewScreen:n})),i.includes("border")&&wp.element.createElement(y.PanelBody,{title:(0,e.__)("Border","qi-blocks"),initialOpen:!1},wp.element.createElement(Jt,{attrNameTemplate:"Advanced",blockAttributes:t,setAttributes:l}),wp.element.createElement(el,{attrNameTemplate:"Advanced",blockAttributes:t,setAttributes:l,popup:!0})),i.includes("positioning")&&wp.element.createElement(y.PanelBody,{title:(0,e.__)("Positioning","qi-blocks"),initialOpen:!1},wp.element.createElement(xe,{label:(0,e.__)("Width","qi-blocks"),blockAttributeKey:o("BlockWidth"),blockAttributes:t,setAttributes:l,selectOptions:[{label:(0,e.__)("Default","qi-blocks"),value:""},{label:(0,e.__)("Full Width (100%)","qi-blocks"),value:"full-width"},{label:(0,e.__)("Inline (auto)","qi-blocks"),value:"inline"},{label:(0,e.__)("Custom","qi-blocks"),value:"custom"}]}),(""===s&&"custom"===t[o("BlockWidth")]||""!==s&&"custom"===t[o("BlockWidth",s)]||""!==s&&"custom"===t[o("BlockWidth")]&&["","custom"].includes(t[o("BlockWidth","Tablet")])&&""===t[o("BlockWidth",s)])&&wp.element.createElement(Gt,{label:(0,e.__)("Custom Width","qi-blocks"),blockAttributeKey:o("BlockCustomWidth"),setAttributes:l,blockAttributes:t,rangeMax:1e3,rangeDecimalMax:100,unitType:"pxPercentVw",allowScreens:!0}),wp.element.createElement(y.SelectControl,{label:(0,e.__)("Position","qi-blocks"),value:t[o("BlockPosition")],options:[{label:(0,e.__)("Default","qi-blocks"),value:""},{label:(0,e.__)("Absolute","qi-blocks"),value:"absolute"},{label:(0,e.__)("Relative","qi-blocks"),value:"relative"},{label:(0,e.__)("Fixed","qi-blocks"),value:"fixed"}],onChange:e=>{l({[o("BlockPosition")]:e})}}),""!==t[o("BlockPosition")]&&wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(y.SelectControl,{label:(0,e.__)("Horizontal Orientation","qi-blocks"),value:t[o("PositionHorizontalOrientation")],options:[{label:(0,e.__)("Left","qi-blocks"),value:"left"},{label:(0,e.__)("Right","qi-blocks"),value:"right"}],onChange:e=>l({[o("PositionHorizontalOrientation")]:e})}),wp.element.createElement(Gt,{label:(0,e.__)("Offset","qi-blocks"),blockAttributeKey:o("PositionHorizontalOffset"),setAttributes:l,blockAttributes:t,rangeMax:1e3,rangeMin:-1e3,rangeDecimalMax:100,rangeDecimalMin:-100,unitType:"measure",allowScreens:!0}),wp.element.createElement(y.SelectControl,{label:(0,e.__)("Vertical Orientation","qi-blocks"),value:t[o("PositionVerticalOrientation")],options:[{label:(0,e.__)("Top","qi-blocks"),value:"Top"},{label:(0,e.__)("Bottom","qi-blocks"),value:"bottom"}],onChange:e=>l({[o("PositionVerticalOrientation")]:e})}),wp.element.createElement(Gt,{label:(0,e.__)("Offset","qi-blocks"),blockAttributeKey:o("PositionVerticalOffset"),setAttributes:l,blockAttributes:t,rangeMax:1e3,rangeMin:-1e3,rangeDecimalMax:100,rangeDecimalMin:-100,unitType:"measure",allowScreens:!0}))),i.includes("responsive")&&wp.element.createElement(y.PanelBody,{title:(0,e.__)("Responsive","qi-blocks"),initialOpen:!1},wp.element.createElement(E,{blockAttributes:t,setAttributes:l})),qiBlocksEditor.vars?.advancedBlockPanel&&wp.element.createElement(wp.element.Fragment,null,Object.entries(qiBlocksEditor.vars.advancedBlockPanel).map(([t,l],a)=>{let n="";if("help"===t?n=(0,e.__)("Help","qi-blocks"):"features"===t&&(n=(0,e.__)("Get more features","qi-blocks")),l.length<=0||"blocks"===t)return"";const o="help"===t,i=r?r.replace("qi-blocks/",""):"",s=l.map((l,a)=>{let n=l?.link;if(0===a&&"help"===t&&i){const e=qiBlocksEditor.vars.advancedBlockPanel?.blocks[i]||"";e&&e?.demo&&(n=e?.demo+"?utm_source=dash&utm_medium=qiblocks&utm_campaign=blocks")}return wp.element.createElement("div",{className:"qodef-m-item"},l?.image?wp.element.createElement(wp.element.Fragment,null,wp.element.createElement("a",{className:"qodef-m-item-image-link",href:l?.link,target:"_blank",rel:"noreferrer"},wp.element.createElement("img",{className:"qodef-m-item-image",src:l.image,alt:l?.title})),wp.element.createElement("p",{className:"qodef-m-item-title"},l?.title),wp.element.createElement("a",{className:"qodef-m-item-button",href:l?.link,target:"_blank",rel:"noreferrer"},(0,e.__)("Upgrade","qi-blocks"))):wp.element.createElement("a",{className:"qodef-m-item-link",href:n,target:"_blank",rel:"noreferrer"},l?.title))});return wp.element.createElement(y.PanelBody,{title:n,className:`qodef-advanced-block-panel-features ${"qodef--"+t} qodef-m`,key:a,initialOpen:o},s)})))}}tl.defaultProps={blockAttributes:{},setAttributes:()=>{},excludePanels:[],previewScreen:"desktop",blockName:""};const ll=(0,o.withSelect)(e=>{let t="desktop";return e("core/edit-post")&&(t="function"==typeof e("core/editor")?.getDeviceType?e("core/editor")?.getDeviceType()?.toLowerCase():e("core/edit-post")?.__experimentalGetPreviewDeviceType()?.toLowerCase()),e("core/edit-site")&&(t="function"==typeof e("core/editor")?.getDeviceType?e("core/editor")?.getDeviceType()?.toLowerCase():e("core/edit-site").__experimentalGetPreviewDeviceType().toLowerCase()),{previewScreen:t,blockName:e("core/block-editor")?.getSelectedBlock()?.name}})(tl),al=wp.apiFetch;var nl=l.n(al);class rl extends ke.Component{constructor(){super(...arguments),this.state={screen:v(),imageId:"",customImageSizeLoading:!1,externalImageIsSet:!1,imageSizeNotExist:!1}}getScreenLabelSuffix(){return V(this.state.screen)}getAttributeName(e){const{attrNameTemplate:t}=this.props;return P(t,e)}getAttributeValue(e,t=this.getScreenLabelSuffix()){const{blockAttributes:l,allowScreens:a,repeater:n,repeaterItemIndex:r,repeaterItemKey:o,repeaterGetAttributes:i}=this.props;let s=e;a&&t&&(s=e+t);let c=l[s];return n&&(c=i({key:o,childKey:s},r)),U(c)}setAttributeValue(e,t,l=this.getScreenLabelSuffix()){const{setAttributes:a,allowScreens:n,repeater:r,repeaterItemIndex:o,repeaterItemKey:i,repeaterSetAttributes:s}=this.props;let c=e;n&&l&&(c=e+l),r?s({key:i,childKey:c},t,o):a({[c]:t})}componentDidMount(){const{allowDefaultImage:e,defaultImageURL:t,allowScreens:l}=this.props,{url:a,id:n,defaultValueIsSet:r}=this.getAttributeValue(this.getAttributeName("Image"));a&&!a.includes(qiBlocksEditor.vars.siteURL)?(this.onSelectURL(a),this.setState({externalImageIsSet:!0})):(a&&(0,Ce.isBlobURL)(a)&&!n&&this.setAttributeValue(this.getAttributeName("Image"),{url:"",alt:"",caption:"",html:""}),l&&["Tablet","Mobile"].map(e=>{const{url:t,id:l}=this.getAttributeValue(this.getAttributeName("Image"),e);t&&(0,Ce.isBlobURL)(t)&&!l&&this.setAttributeValue(this.getAttributeName("Image"),{url:"",alt:"",caption:"",html:""},e)}),!e||r||a||n||this.setAttributeValue(this.getAttributeName("Image"),{id:null,url:t||qiBlocksEditor.vars.defaultImage,alt:qiBlocksEditor.vars.defaultImagePlaceholder,caption:"",html:""}),n&&(this.setState({imageId:n}),this.updateImageSizeOption(n)))}setSVGIcon=(e,t,l,a)=>{const n=new XMLHttpRequest;null!=n&&(n.open("GET",t,!0),n.onreadystatechange=()=>{4===n.readyState&&200===n.status&&this.setAttributeValue(this.getAttributeName("Image"),{id:e,url:t,alt:l,caption:a,html:Vt.sanitize(n.responseText,{USE_PROFILES:{svg:!0,svgFilters:!0}})})},n.send())};onSelectImage=({id:e,url:t,alt:l,caption:a})=>{this.setAttributeValue(this.getAttributeName("ImageSize"),""),t.includes(".svg")?this.setSVGIcon(e,t,l,a):this.setAttributeValue(this.getAttributeName("Image"),{id:e,url:t,alt:l,caption:a}),this.setState({imageId:e,externalImageIsSet:!1}),this.updateImageSizeOption(e)};updateImageSizeOption=e=>{if(this.props.allowImageSizes){let t=0;const l=setInterval(()=>{((0,o.select)("core").getMedia(e)||t>5)&&(clearInterval(l),this.forceUpdate()),t++},1e3)}};onSelectURL=e=>{e.includes(".svg")?this.setSVGIcon(null,e,"",""):this.setAttributeValue(this.getAttributeName("Image"),{id:null,url:e,alt:"",caption:"",html:""}),this.setAttributeValue(this.getAttributeName("ImageSize"),""),this.setState({externalImageIsSet:!1})};onUploadError=e=>{const{noticeOperations:t}=this.props;t.createErrorNotice(e)};removeImage=()=>{this.setAttributeValue(this.getAttributeName("Image"),{id:null,url:"",alt:"",caption:"",html:"",defaultValueIsSet:!!this.props.allowDefaultImage})};getImageSizes(){const{imageSizes:t,additionalImageSizes:l}=this.props,a=this.getAttributeValue(this.getAttributeName("Image"));let n=[];if(a){const r=(0,o.select)("core").getMedia(a.id);if(!r)return[];const i=r.media_details.sizes;i&&0===Object.keys(i).length&&n.push({label:(0,e.__)("Default","qi-blocks"),value:""});for(const e in i){const l=t.find(t=>t.slug===e);l&&n.push({label:l.name,value:e})}l&&l.length>1&&l.map(e=>{n.push({label:e.label,value:e.value})}),n.push({label:(0,e.__)("Custom","qi-blocks"),value:"custom"})}return n}onImageSizeChange=e=>{this.setAttributeValue(this.getAttributeName("ImageSize"),e);const t=(0,o.select)("core").getMedia(this.state.imageId);if(t){let l=t.source_url;""!==e&&(l=this.getImageURLbySize(e)||t.source_url),"custom"===e?this.getImageURLbyCustomSize(e):this.setAttributeValue(this.getAttributeName("Image"),{id:t.id,url:l,alt:t.alt_text||"",caption:t.caption&&t.caption.raw||""})}};getImageURLbySize(e){const t=this.getAttributeValue(this.getAttributeName("Image"));let l="";if(t){const a=(0,o.select)("core").getMedia(t.id);if(!a)return"";this.setState({customImageSizeLoading:!0});const n=a.media_details.sizes;if(n&&0===Object.keys(n).length)this.setState({imageSizeNotExist:!0,customImageSizeLoading:!1});else{this.setState({imageSizeNotExist:!1,customImageSizeLoading:!1});for(const t in n){if(t===e){l=n[t].source_url;break}if(t.includes("qi_blocks_image_size_"+e.replace("-","_"))){l=n[t].source_url;break}}}["","custom"].includes(e)&&this.setState({imageSizeNotExist:!1})}return l}getImageURLbyCustomSize=()=>{const e=(0,o.select)("core").getMedia(this.state.imageId);if(e){let t=e.source_url;const l=parseInt(this.getAttributeValue(this.getAttributeName("ImageCustomWidth")),10),a=parseInt(this.getAttributeValue(this.getAttributeName("ImageCustomHeight")),10);t&&l&&a&&(this.setState({customImageSizeLoading:!0}),nl()({method:"POST",path:"/qi-blocks/v1/resize-image",data:{image_id:this.state.imageId,custom_size:{width:l,height:a}}}).then(l=>{"success"===l.status&&(t=l.data.url),this.setState({customImageSizeLoading:!1}),this.setAttributeValue(this.getAttributeName("Image"),{id:e.id,url:t,alt:e.alt_text||"",caption:e.caption&&e.caption.raw||""})}))}};render(){const t={...this.props},l={...this.state},{label:a,noticeUI:n,allowScreens:r,allowImageSizes:o}=t,i=this.getAttributeValue(this.getAttributeName("Image")),{id:s,url:c,alt:u,html:p}=i;return t.onChangeScreen=e=>{this.setState({screen:e}),this.updateImageSizeOption(s)},wp.element.createElement(y.BaseControl,{className:"qodef-advanced-image-option qodef-image-option"},wp.element.createElement("div",{className:"qodef-advanced-select-heading"},r?wp.element.createElement(Se,{label:a,onChangeScreen:t.onChangeScreen}):wp.element.createElement(wp.element.Fragment,null,a&&wp.element.createElement("label",{className:"qodef-option-label"},a))),c?wp.element.createElement(wp.element.Fragment,null,wp.element.createElement("div",{className:"qodef-image-option-inner"},((0,Ce.isBlobURL)(c)||l.customImageSizeLoading)&&wp.element.createElement("div",{className:"qodef-image-option-spinner"},wp.element.createElement(y.Spinner,null)),wp.element.createElement(fe.MediaUploadCheck,null,wp.element.createElement(fe.MediaUpload,{allowedTypes:["image"],value:s,onSelect:this.onSelectImage,render:({open:t})=>wp.element.createElement(wp.element.Fragment,null,wp.element.createElement("img",{src:c,alt:u}),wp.element.createElement("div",{className:"qodef-image-option-actions"},wp.element.createElement(y.Button,{icon:"edit",showTooltip:!0,label:(0,e.__)("Edit Image","qi-blocks"),onClick:t}),wp.element.createElement(y.Button,{icon:"trash",showTooltip:!0,label:(0,e.__)("Remove Image","qi-blocks"),onClick:this.removeImage})))}))),l.imageSizeNotExist&&wp.element.createElement("p",{className:"qodef-image-notice"},(0,e.__)("The Image has no predefined sizes, please set a custom image size.","qi-blocks")),l.externalImageIsSet&&wp.element.createElement("p",{className:"qodef-image-notice"},(0,e.__)("External image URL is set, please upload your image for this Element.","qi-blocks"))):wp.element.createElement(fe.MediaPlaceholder,{allowedTypes:["image"],icon:"format-image",onSelect:this.onSelectImage,onSelectURL:this.onSelectURL,onError:this.onUploadError,notices:n}),o&&s&&!p&&wp.element.createElement("div",{className:"qodef-image-option-sizes"},this.getImageSizes()&&this.getImageSizes().length>0?wp.element.createElement(y.SelectControl,{label:(0,e.__)("Image Size","qi-blocks"),options:this.getImageSizes(),onChange:this.onImageSizeChange,value:this.getAttributeValue(this.getAttributeName("ImageSize"))||"full"}):wp.element.createElement(y.Spinner,null),"custom"===this.getAttributeValue(this.getAttributeName("ImageSize"))&&wp.element.createElement("div",{className:"qodef-image-option-custom-size"},wp.element.createElement("label",{className:"qodef-option-label"},(0,e.__)("Custom Image Size","qi-blocks")),wp.element.createElement(y.TextControl,{type:"number",label:(0,e.__)("Width","qi-blocks"),value:this.getAttributeValue(this.getAttributeName("ImageCustomWidth")),onChange:e=>this.setAttributeValue(this.getAttributeName("ImageCustomWidth"),M(e)),min:1,max:2560,step:1}),wp.element.createElement(y.TextControl,{type:"number",label:(0,e.__)("Height","qi-blocks"),value:this.getAttributeValue(this.getAttributeName("ImageCustomHeight")),onChange:e=>this.setAttributeValue(this.getAttributeName("ImageCustomHeight"),M(e)),min:1,max:2560,step:1}),wp.element.createElement(y.Button,{isPrimary:!0,text:(0,e.__)("Apply Changes","qi-blocks"),onClick:this.getImageURLbyCustomSize}))))}}rl.defaultProps={label:(0,e.__)("Image","qi-blocks"),attrNameTemplate:"",blockAttributes:{},setAttributes:()=>{},allowDefaultImage:!1,defaultImageURL:"",allowScreens:!1,allowImageSizes:!0,additionalImageSizes:[],repeater:!1,repeaterItemIndex:0,repeaterItemKey:"",repeaterSetAttributes:()=>{},repeaterGetAttributes:()=>{}};const ol=(0,o.withSelect)(e=>({imageSizes:e("core/block-editor")?.getSettings()?.imageSizes}))((0,y.withNotices)(rl));class il extends ke.Component{constructor(){super(...arguments),this.state={isSettingsPanelVisible:!1}}getAttributeValue(e){const{blockAttributes:t,repeater:l,repeaterItemIndex:a,repeaterItemKey:n,repeaterGetAttributes:r}=this.props;let o=t[e];return l&&(o=r({key:n,childKey:e},a)),U(o)}setAttributeValue(e,t){const{setAttributes:l,repeater:a,repeaterItemIndex:n,repeaterItemKey:r,repeaterSetAttributes:o}=this.props;a?o({key:r,childKey:e},t,n):l({[e]:t})}onClick=e=>{e.preventDefault();const t=this;t.setState({isSettingsPanelVisible:!this.state.isSettingsPanelVisible}),window.addEventListener("click",e=>{const l=document.querySelectorAll(".qodef-url-input-control.qodef--opened");l.length&&l.forEach(l=>{l.contains(e.target)||t.setState({isSettingsPanelVisible:!1})})})};render(){const t={...this.props},l={...this.state},{label:a,attrNameTemplate:n,disableSuggestions:r}=t,o=P(n,"Link"),i=P(n,"LinkTargetBlank"),s=P(n,"LinkRelNofollow"),c=P(n,"LinkCustomAttributes");return wp.element.createElement(y.BaseControl,{className:"qodef-url-input-control "+(l.isSettingsPanelVisible?"qodef--opened":"")},wp.element.createElement("div",{className:"qodef-control-heading"},wp.element.createElement("label",{className:"qodef-option-label"},a),wp.element.createElement(y.Button,{onClick:this.onClick,className:"qodef-url-input-settings-button",icon:"admin-settings"})),wp.element.createElement(fe.URLInput,{value:this.getAttributeValue(o),onChange:e=>this.setAttributeValue(o,e),className:"qodef-url-input",disableSuggestions:r}),l.isSettingsPanelVisible&&wp.element.createElement(y.Card,{size:"small"},wp.element.createElement(y.CardBody,null,wp.element.createElement(y.ToggleControl,{label:(0,e.__)("Open in new window","qi-blocks"),checked:this.getAttributeValue(i),onChange:e=>this.setAttributeValue(i,e)}),wp.element.createElement(y.ToggleControl,{label:(0,e.__)("Add nofollow","qi-blocks"),checked:this.getAttributeValue(s),onChange:e=>this.setAttributeValue(s,e)}),wp.element.createElement(y.TextControl,{label:(0,e.__)("Custom Attributes","qi-blocks"),help:(0,e.__)("Set custom attributes for the link element. Separate attribute keys from values using the | (pipe) character. Separate key-value pairs with a comma.","qi-blocks"),value:this.getAttributeValue(c),placeholder:(0,e.__)("key|value","qi-blocks"),onChange:e=>this.setAttributeValue(c,e)}))))}}il.defaultProps={label:"",attrNameTemplate:"",disableSuggestions:!1,blockAttributes:{},setAttributes:()=>{},repeater:!1,repeaterItemIndex:0,repeaterItemKey:"",repeaterSetAttributes:()=>{},repeaterGetAttributes:()=>{}};const sl=il,cl=(e,t="")=>{let l={},a={};if(!e)return l;const n=e=>P(t,e);return z(e[n("Link")])&&(l.href=e[n("Link")]),z(e[n("LinkTargetBlank")],"all")&&(l.target="_blank",l.rel="noopener noreferrer"),z(e[n("LinkRelNofollow")],"all")&&(l.rel=void 0!==l.rel?l.rel+" nofollow":"nofollow"),z(e[n("LinkCustomAttributes")])&&(a=((e="")=>{let t=[];if(""!==e){let l=e.split(",");l.length&&l.forEach(e=>{let l=e.trim().split("|");2===l.length&&(t[l[0]]=l[1])})}return t})(e[n("LinkCustomAttributes")])),ge()(l,a)};function ul(e){var t,l,a="";if("string"==typeof e||"number"==typeof e)a+=e;else if("object"==typeof e)if(Array.isArray(e)){var n=e.length;for(t=0;t<n;t++)e[t]&&(l=ul(e[t]))&&(a&&(a+=" "),a+=l)}else for(l in e)e[l]&&(a&&(a+=" "),a+=l);return a}const pl=function(){for(var e,t,l=0,a="",n=arguments.length;l<n;l++)(e=arguments[l])&&(t=ul(e))&&(a&&(a+=" "),a+=t);return a};var ml=l(4848);const bl=e=>(0,ke.createElement)("path",e),dl=(0,ke.forwardRef)(({className:e,isPressed:t,...l},a)=>{const n={...l,className:pl(e,{"is-pressed":t})||void 0,"aria-hidden":!0,focusable:!1};return(0,ml.jsx)("svg",{...n,ref:a})});dl.displayName="SVG";const gl=(0,ml.jsx)(dl,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ml.jsx)(bl,{d:"M13 5.5H4V4h9v1.5Zm7 7H4V11h16v1.5Zm-7 7H4V18h9v1.5Z"})}),fl=(0,ml.jsx)(dl,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ml.jsx)(bl,{d:"M7.5 5.5h9V4h-9v1.5Zm-3.5 7h16V11H4v1.5Zm3.5 7h9V18h-9v1.5Z"})}),hl=(0,ml.jsx)(dl,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,ml.jsx)(bl,{d:"M11.111 5.5H20V4h-8.889v1.5ZM4 12.5h16V11H4v1.5Zm7.111 7H20V18h-8.889v1.5Z"})});class kl extends ke.Component{constructor(){super(...arguments),this.state={screen:v()}}getScreenLabelSuffix(){return V(this.state.screen)}render(){const e={...this.props},{label:t,blockAttributes:l,setAttributes:a,attrNameTemplate:n,excludeDirection:r}=e,o={left:gl,center:fl,right:hl},i=["left","center","right"].filter(e=>![r].includes(e)),s="HorizontalAlignment",c=P(n,s),u=P(n,s,"Tablet"),p=P(n,s,"Mobile");return e.onChangeScreen=e=>{this.setState({screen:e})},e.onChangeAlignment=e=>{const t=this.getScreenLabelSuffix();a({[`${c}${t}`]:e})},wp.element.createElement(y.BaseControl,{className:"qodef-alignment-horizontal-option"},wp.element.createElement(Se,{label:t,onChangeScreen:e.onChangeScreen}),"desktop"===this.state.screen&&wp.element.createElement(y.ToolbarGroup,null,i.map((t,a)=>wp.element.createElement(y.ToolbarButton,{key:a,icon:o[t],className:ve()("qodef-alignment-horizontal",{"qodef--selected":t===l[c]}),onClick:()=>e.onChangeAlignment(t)}))),"tablet"===this.state.screen&&wp.element.createElement(y.ToolbarGroup,null,i.map((t,a)=>wp.element.createElement(y.ToolbarButton,{key:a,icon:o[t],className:ve()("qodef-alignment-horizontal",{"qodef--selected":t===l[u]}),onClick:()=>e.onChangeAlignment(t)}))),"mobile"===this.state.screen&&wp.element.createElement(y.ToolbarGroup,null,i.map((t,a)=>wp.element.createElement(y.ToolbarButton,{key:a,icon:o[t],className:ve()("qodef-alignment-horizontal",{"qodef--selected":t===l[p]}),onClick:()=>e.onChangeAlignment(t)}))))}}kl.defaultProps={label:(0,e.__)("Alignment","qi-blocks"),attrNameTemplate:"",blockAttributes:{},setAttributes:()=>{},excludeDirection:""};const _l=kl,vl=e=>{const t=t=>P(e.attrNameTemplate,e.attrName,t),l=z(e,"all")&&void 0!==e.disableDirections&&e.disableDirections.length>0?e.disableDirections:[],a=z(e,"all")&&void 0!==e.isImportant&&e.isImportant?" !important":"",{blockAttributes:n}=e,r=["Top","Right","Bottom","Left"];let o={},i={},s={};return Object.entries(k).map(([c])=>{const u=V(c),p=t("Unit"+u),m="p"===n[p]?"%":n[p]||"px";[...r].map((p,b)=>{const d=n[t(p+u)],g=n[t(`${p}Decimal`+u)];if(z(d)||z(g)){let t;const n=e.attrName?e.attrName.toLowerCase():"";if(n.includes("border")){if(n.includes("width"))t=`border${p}Width`;else if(n.includes("radius")){let e,l,a;l=b%2?r[b-1]:p,a=b%2?p:r[r.length-b-1],e=`${l}${a}`,t=`border${e}Radius`}}else t=e.attrName?`${n}${p}`:p.toLowerCase();let u="";if(R(m)&&""!==d?u=l.length>0&&l.includes(p)?"":parseInt(d,10)+m:L(m)&&""!==g&&(u=l.length>0&&l.includes(p)?"":parseFloat(g)+m),u)switch(c){case"desktop":o[t]=u+a;break;case"tablet":i[t]=u+a;break;case"mobile":s[t]=u+a}}})}),{desktop:o,tablet:i,mobile:s}};vl.defaultProps={attrNameTemplate:"",attrName:"",blockAttributes:{},disableDirections:[],isImportant:!1};const yl=vl,wl=e=>{const{blockAttributes:t}=e,l=z(e,"all")&&e.attrNameTemplate||"",a=z(e,"all")&&e.disableWidthDirections||[],n=!z(e,"all")||(e.allowBorderColor??!0),r=(e,t)=>P(l,e,t);let o={},i={};const s=!z(e,"all")||(e.allowBorderRadius??!0)?yl({blockAttributes:t,attrNameTemplate:l,attrName:"BorderRadius",disableDirections:a}):{};return t[r("BorderStyle")]&&(o.borderStyle=t[r("BorderStyle")],n&&t[r("BorderColor")]&&(o.borderColor=t[r("BorderColor")]),i=yl({attrNameTemplate:l,attrName:"BorderWidth",blockAttributes:t})),ge()({desktop:o,tablet:{},mobile:{}},i,s)};wl.defaultProps={attrNameTemplate:"",allowBorderColor:!0,allowBorderRadius:!0,blockAttributes:{}};const Al=wl,Sl=e=>{const{blockAttributes:t}=e,l=z(e,"all")&&e.attrNameTemplate||"",a=z(e,"all")&&e.attrName||"Background",n=(e,t)=>P(l,a+e,t);let r={},o={},i={};return t[n("Attachment")]&&(r.backgroundAttachment=t[n("Attachment")]),Object.entries(k).map(([e])=>{let l=V(e),a={};if(t[n("Image",l)]&&t[n("Image",l)].url&&(a.backgroundImage=`url(${t[n("Image",l)].url})`),t[n("Repeat",l)]&&(a.backgroundRepeat=t[n("Repeat",l)]),"custom"===t[n("Position",l)]){let e="",r="";(t[n("XPosition",l)]||t[n("XPositionDecimal",l)])&&(R(t[n("XPositionUnit",l)])&&t[n("XPosition",l)]?e=parseInt(t[n("XPosition",l)],10)+t[n("XPositionUnit",l)]:L(t[n("XPositionUnit",l)])&&t[n("XPositionDecimal",l)]&&(e=parseFloat(t[n("XPositionDecimal",l)])+t[n("XPositionUnit",l)])),(t[n("YPosition",l)]||t[n("YPositionDecimal",l)])&&(R(t[n("YPositionUnit",l)])&&t[n("YPosition",l)]?r=parseInt(t[n("YPosition",l)],10)+t[n("YPositionUnit",l)]:L(t[n("YPositionUnit",l)])&&t[n("YPositionDecimal",l)]&&(r=parseFloat(t[n("YPositionDecimal",l)])+t[n("YPositionUnit",l)])),""===e&&""===r||(a.backgroundPosition=e+" "+r)}else t[n("Position",l)]&&(a.backgroundPosition=t[n("Position",l)]);"custom"===t[n("Size",l)]?(t[n("SizeWidth",l)]||t[n("SizeWidthDecimal",l)])&&(R(t[n("SizeWidthUnit",l)])&&t[n("SizeWidth",l)]?a.backgroundSize=parseInt(t[n("SizeWidth",l)],10)+t[n("SizeWidthUnit",l)]+" auto":L(t[n("SizeWidthUnit",l)])&&t[n("SizeWidthDecimal",l)]&&(a.backgroundSize=parseFloat(t[n("SizeWidthDecimal",l)])+t[n("SizeWidthUnit",l)]+" auto")):t[n("Size",l)]&&(a.backgroundSize=t[n("Size",l)]),Object.keys(a).length>0&&Object.entries(a).map(([t,l])=>{switch(e){case"desktop":r[t]=l;break;case"tablet":o[t]=l;break;case"mobile":i[t]=l}})}),{desktop:r,tablet:o,mobile:i}};Sl.defaultProps={attrNameTemplate:"",attrName:"Background",blockAttributes:{}};const El=Sl,ql=e=>{const{blockAttributes:t}=e,l=z(e,"all")&&e.attrNameTemplate||"",a=(e,t)=>P(l,e,t),n=t[a("BackgroundType")]||"";let r={},o={},i={};if("gradient"===n){let e={type:"linear",position:"",color_1:"",location_1:"",color_2:"",location_2:""};t[a("BackgroundGradientColor1")]&&(e.color_1=t[a("BackgroundGradientColor1")]),z(t[a("BackgroundGradientLocation1")])&&(e.location_1=M(t[a("BackgroundGradientLocation1")])+"%"),t[a("BackgroundGradientColor2")]&&(e.color_2=t[a("BackgroundGradientColor2")]),z(t[a("BackgroundGradientLocation2")])&&(e.location_2=M(t[a("BackgroundGradientLocation2")])+"%"),t[a("BackgroundGradientType")]&&(e.type=t[a("BackgroundGradientType")]),"linear"===e.type&&""!==t[a("BackgroundGradientTypeAngle")]?e.position=M(t[a("BackgroundGradientTypeAngle")])+"deg":"radial"===e.type&&t[a("BackgroundGradientTypePosition")]&&(e.position="at "+t[a("BackgroundGradientTypePosition")]),e.type&&e.position&&e.color_1&&e.location_1&&e.color_2&&e.location_2?(r.backgroundColor="transparent",r.backgroundImage=`${e.type}-gradient(${e.position}, ${e.color_1} ${e.location_1}, ${e.color_2} ${e.location_2})`):e.color_1&&(r.backgroundColor=e.color_1)}else"video"===n?!t[a("BackgroundVideoPlayOnMobile")]&&t[a("BackgroundVideoFallbackImage")]&&t[a("BackgroundVideoFallbackImage")].url&&(o.backgroundImage=`url(${t[a("BackgroundVideoFallbackImage")].url})`,o.backgroundPosition="center",o.backgroundSize="cover"):(t[a("BackgroundColor")]&&(r.backgroundColor=t[a("BackgroundColor")]),i=El({attrNameTemplate:l,blockAttributes:t}));return ge()({desktop:r,tablet:{},mobile:o},i)};ql.defaultProps={attrNameTemplate:"",blockAttributes:{}};const Il=ql,xl=e=>{const{blockAttributes:t,excludeOptions:l}=e,a=z(e,"all")&&e.attrNameTemplate||"",n=(e,t)=>P(a,e,t);let r={},o={x:0,y:0,blur:0,spread:0,color:"",position:""};var i;return t[n("BoxShadowColor")]&&(o.color=t[n("BoxShadowColor")]),""!==t[n("BoxShadowHorizontal")]&&(o.x=t[n("BoxShadowHorizontal")]),""!==t[n("BoxShadowVertical")]&&(o.y=t[n("BoxShadowVertical")]),""!==t[n("BoxShadowBlur")]&&(o.blur=t[n("BoxShadowBlur")]),""!==t[n("BoxShadowSpread")]&&(o.spread=t[n("BoxShadowSpread")]),i="position",l&&l.length&&l.includes(i)||!t[n("BoxShadowPosition")]||(o.position=t[n("BoxShadowPosition")]),o.color&&(r.boxShadow=o.x+"px "+o.y+"px "+o.blur+"px "+o.spread+"px "+o.color+" "+o.position),{desktop:r,tablet:{},mobile:{}}};xl.defaultProps={attrNameTemplate:"",blockAttributes:{}};const Cl=xl,Tl=e=>{const{blockAttributes:t}=e,l=(e,t="")=>P("",e,t),a=z(e,"all")&&e.excludePanels||[],n=z(e,"all")&&e.includePanels||[];let r=n&&n.length?n:["advanced","motion-effects","background","border","positioning","responsive"];a&&a.length&&a.forEach(e=>{r.splice(r.indexOf(e),1)});let o={},i={},s={},c={},u={};r.includes("advanced")&&(z(t[l("zIndex")])&&(o.zIndex=M(t[l("zIndex")])),c=yl({attrName:l("Margin"),blockAttributes:t}),u=yl({attrName:l("Padding"),blockAttributes:t})),r.includes("motion-effects")&&void 0!==t[l("EntranceAnimation")]&&""!==t[l("EntranceAnimation")]&&t[l("EntranceAnimationDelay")]&&(o.animationDelay=M(t[l("EntranceAnimationDelay")])+"ms");let p={};r.includes("background")&&(p=Il({attrNameTemplate:"Advanced",blockAttributes:t}));let m={};if(r.includes("border")){const e=Al({attrNameTemplate:"Advanced",blockAttributes:t}),l=Cl({attrNameTemplate:"Advanced",blockAttributes:t});m=ge()(e,l)}if(r.includes("positioning")){z(t[l("BlockPosition")])&&(o.position=t[l("BlockPosition")]);const e=t[l("PositionHorizontalOrientation")],a=t[l("PositionVerticalOrientation")];Object.entries(k).map(([n])=>{let r=V(n),c={};"custom"!==t[l("BlockWidth")]&&"custom"!==t[l("BlockWidth",r)]||!t[l("BlockCustomWidth",r)]&&!t[l("BlockCustomWidthDecimal",r)]||(R(t[l("BlockCustomWidthUnit",r)])&&t[l("BlockCustomWidth",r)]?(c.width=parseInt(t[l("BlockCustomWidth",r)],10)+t[l("BlockCustomWidthUnit",r)],c.maxWidth=parseInt(t[l("BlockCustomWidth",r)],10)+t[l("BlockCustomWidthUnit",r)]):L(t[l("BlockCustomWidthUnit",r)])&&t[l("BlockCustomWidthDecimal",r)]&&(c.width=parseFloat(t[l("BlockCustomWidthDecimal",r)])+t[l("BlockCustomWidthUnit",r)],c.maxWidth=parseFloat(t[l("BlockCustomWidthDecimal",r)])+t[l("BlockCustomWidthUnit",r)])),""===U(t[l("PositionHorizontalOffset",r)])&&""===U(t[l("PositionHorizontalOffsetDecimal",r)])||(R(t[l("PositionHorizontalOffsetUnit",r)])&&""!==U(t[l("PositionHorizontalOffset",r)])?c[e]=parseInt(t[l("PositionHorizontalOffset",r)],10)+t[l("PositionHorizontalOffsetUnit",r)]:L(t[l("PositionHorizontalOffsetUnit",r)])&&""!==U(t[l("PositionHorizontalOffsetDecimal",r)])&&(c[e]=parseFloat(t[l("PositionHorizontalOffsetDecimal",r)])+t[l("PositionHorizontalOffsetUnit",r)])),""===U(t[l("PositionVerticalOffset",r)])&&""===U(t[l("PositionVerticalOffsetDecimal",r)])||(R(t[l("PositionVerticalOffsetUnit",r)])&&""!==U(t[l("PositionVerticalOffset",r)])?c[a]=parseInt(t[l("PositionVerticalOffset",r)],10)+t[l("PositionVerticalOffsetUnit",r)]:L(t[l("PositionVerticalOffsetUnit",r)])&&""!==U(t[l("PositionVerticalOffsetDecimal",r)])&&(c[a]=parseFloat(t[l("PositionVerticalOffsetDecimal",r)])+t[l("PositionVerticalOffsetUnit",r)])),Object.keys(c).length>0&&Object.entries(c).map(([e,t])=>{switch(n){case"desktop":o[e]=t;break;case"tablet":i[e]=t;break;case"mobile":s[e]=t}})})}return o={desktop:o,tablet:i,mobile:s},ge()(o,c,u,p,m)};Tl.defaultProps={blockAttributes:{},excludePanels:[],includePanels:[]};const Nl=Tl;let Pl=[];const Bl=qiBlocksEditor.vars.systemFontOptions,Vl=e=>{let t=!0;return e||(t=!1),Bl&&Bl.map(({value:e})=>e).forEach(l=>{""!==l&&e===l&&(t=!1)}),t},Ol=e=>{Object.keys(e).filter(e=>e.match(/fontfamily/i)).forEach(t=>{const l=e[t];l&&setTimeout(()=>{(e=>{if(qiBlocksEditor.qodefGetCurrentBlockElement.getIframe()&&(Pl=[]),Pl.includes(e))return;const t=qiBlocksEditor.qodefGetCurrentBlockElement.getCurrentDocument();if(t&&Vl(e)){const l=t.createElement("link");l.setAttribute("href",(e=>`https://fonts.googleapis.com/css?family=${e.replace(/ /g,"+")}:100,100italic,200,200italic,300,300italic,400,400italic,500,500italic,600,600italic,700,700italic,800,800italic,900,900italic&subset=latin-ext`)(e)),l.setAttribute("rel","stylesheet"),l.setAttribute("type","text/css"),t.querySelector("head").appendChild(l)}Pl.push(e)})(l)},400)})},Dl=(0,he.createHigherOrderComponent)(e=>class extends ke.Component{static defaultProps={attributes:{}};componentDidMount(){Ol(this.props.attributes)}render(){return wp.element.createElement(e,this.props)}},"withGoogleFont");var Rl=l(2404),Ll=l.n(Rl);const Ml=(0,he.createHigherOrderComponent)(e=>class extends ke.Component{static defaultProps={clientId:"",attributes:{},setAttributes:()=>{}};componentDidMount(){const{clientId:e,attributes:t,setAttributes:l}=this.props;t.uniqueClass||l({uniqueClass:this.getNewUniqueClass(e)}),this.reInitUniqueClass(!0)}getNewUniqueClass(e){let t="qodef-block-";return this.props.isFullSiteEditor?t="qodef-template-block-":"widget"===this.props.postID&&(t="qodef-widget-block-"),`${t}${e.substring(0,8)}`}hasParent(e,t){let l=!1,a=e?.parentNode;for(;a;){let e=a;if(e&&e?.classList?.contains(t)){l=!0;break}if(!e?.parentNode)break;a=e.parentNode}return l}reInitUniqueClass(e){const{clientId:t,attributes:l,setAttributes:a,isFullSiteEditor:n}=this.props,{uniqueClass:r}=l,o=qiBlocksEditor.qodefGetCurrentBlockElement.getCurrentDocument(),i=this.getNewUniqueClass(t);let s=!1;if(n){if(r.includes("qodef-block")||r.includes("qodef-widget")){const e=o.querySelector(`.${r}`);if(e){this.hasParent(e,"wp-block-post-content")||(s=!0)}}e&&o.addEventListener("paste",()=>{s=!0})}!n&&r.includes("qodef-template-block")&&(s=!0),""!==r&&r!==i&&o.querySelectorAll(`.${r}`).length>1&&(s=!0),s&&a({uniqueClass:i})}render(){return this.reInitUniqueClass(),wp.element.createElement(e,this.props)}},"withUniqueClass"),zl=Ml;function Ul(){return Ul=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var l=arguments[t];for(var a in l)({}).hasOwnProperty.call(l,a)&&(e[a]=l[a])}return e},Ul.apply(null,arguments)}let Fl=[],jl={family:[],weight:[],style:[]};const Hl=e=>{let t="";return Object.entries(e).map(([e,l])=>{if(e.match(/fontfamily/i)){const e=l.replace(/["']/g,"");!Fl.includes(e)&&Vl(e)&&(jl.family.push(e),Fl.push(e))}e.match(/fontweight/i)&&jl.weight.push(parseInt(l,10)),e.match(/fontstyle/i)&&jl.style.push(l),t+=`${e.replace(/([A-Z])/g,(e,t,l)=>(l>0?"-":"")+e.toLowerCase())}: ${l};`}),t},Kl=(0,he.createHigherOrderComponent)(e=>class extends ke.Component{addPageStyle(e){if(e){const t=this.postID;let l=this.getPageStyles||[],a={key:this.attributes.uniqueClass,values:[],fonts:[]};Fl=[],jl={family:[],weight:[],style:[]},e.forEach((n,r)=>{if(!Object.values(n.styles).every(e=>0===Object.keys(e).length)){const e=["widget","template"].includes(t)?"":`body[class*="-${t}"]`,l=`${e} ${n.selector}`,r=[];"string"!=typeof n.selector&&n.selector.forEach(t=>{t&&r.push(`${e} ${t}`)}),a.values.push({selector:r.length>1?r.join(","):l,styles:Hl(n.styles.desktop||""),tablet_styles:Hl(n.styles.tablet||""),mobile_styles:Hl(n.styles.mobile||""),custom_styles:n.custom_styles||[]}),a.fonts=jl}if(r===e.length-1)if(l&&l.length){let e=!1;l.map((t,n)=>{t.key===a.key&&(e=!0,a.values.length?Ll()(t.values,a.values)||(l[n].values=a.values,l[n].fonts=a.fonts):(l[n].values=[],l[n].fonts={family:[],weight:[],style:[]}))}),!e&&a.values.length&&l.push(a)}else"object"==typeof l&&Object.keys(l).length?(l=Object.values(l),l.push(a)):l.push(a);const o=l.filter(e=>e.values.length);qiBlocksEditor.vars.currentPageID=t,qiBlocksEditor.vars.currentPageStyles=o})}}render(){return wp.element.createElement(e,Ul({},this.props,{addPageStyle:this.addPageStyle}))}},"withStyles"),Gl=(0,he.compose)((0,o.withSelect)(e=>{let t=e("core/editor")?.getCurrentPostId()||"widget";const l=!!e("core/edit-site");let a="desktop";return e("core/edit-post")&&(a="function"==typeof e("core/editor")?.getDeviceType?e("core/editor")?.getDeviceType()?.toLowerCase():e("core/edit-post")?.__experimentalGetPreviewDeviceType()?.toLowerCase()),l&&(t="template",a="function"==typeof e("core/editor")?.getDeviceType?e("core/editor")?.getDeviceType()?.toLowerCase():e("core/edit-site").__experimentalGetPreviewDeviceType().toLowerCase()),{previewScreen:a,postID:t,getPageStyles:e("qi-blocks/data/with-styles").getOptions(t).data,isFullSiteEditor:l}}),zl,Kl);function $l(){return $l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var l=arguments[t];for(var a in l)({}).hasOwnProperty.call(l,a)&&(e[a]=l[a])}return e},$l.apply(null,arguments)}class Wl extends ke.Component{render(){const{attributes:t,setAttributes:l,previewScreen:a}=this.props,{uniqueClass:n,image:r,enablePopup:o,galleryData:i,imageHover:s,imageZoomOrigin:c}=t;const u=C(t),p=Nl({blockAttributes:t}),m={className:I(t),style:O(p,a),...x(t)};u&&(m.id=u);const b=ve()(T("single-image",this.props),{"qi-block-fslightbox-popup qodef-popup-gallery":o,[`qodef-hover--${s}`]:s,[`qodef-hover-from--${c}`]:["zoom","zoom-out"].includes(s)&&c});t.galleryData=i&&""!==i?i:"gallery-"+Math.floor(1001*Math.random());const d=j({attributes:t,blockAttrName:"horizontalAlignment",cssProp:"textAlign"}),g=j({attributes:t,blockAttrName:"imageWidth",cssProp:"width"}),f=j({attributes:t,blockAttrName:"imageMaxWidth",cssProp:"maxWidth"}),h=j({attributes:t,blockAttrName:"imageHeight",cssProp:"height"}),k=j({attributes:t,blockAttrName:"imageOpacityDecimal",cssProp:"opacity",customUnitValue:!0}),_=j({attributes:t,blockAttrName:"transitionDurationDecimal",cssProp:"transitionDuration",customUnitValue:!0},"%ss"),v=Al({attrNameTemplate:"Image",blockAttributes:t}),w=j({attributes:t,blockAttrName:"imageHoverOpacityDecimal",cssProp:"opacity",customUnitValue:!0}),S=ge()(g,f,h,k,_,v),E=w;return this.props.addPageStyle([{selector:`.${n}.qodef-block-container`,styles:p},{selector:`.${n} .qi-block-single-image`,styles:d},{selector:[`.${n} .qi-block-single-image img`,`.${n} .qi-block-single-image svg`],styles:S},{selector:[`.${n} .qi-block-single-image:hover img`,`.${n} .qi-block-single-image:hover svg`],styles:E}]),wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(fe.InspectorControls,null,wp.element.createElement(y.TabPanel,{className:"qodef-tab-panel qodef--single-image",activeClass:"qodef--active",tabs:[{name:"content",title:(0,e.__)("Content","qi-blocks")},{name:"style",title:(0,e.__)("Style","qi-blocks")},{name:"advanced",title:(0,e.__)("Advanced","qi-blocks")}]},a=>wp.element.createElement(wp.element.Fragment,null,"content"===a.name&&wp.element.createElement(y.BaseControl,{className:"qodef-base-control-container"},wp.element.createElement(ol,{blockAttributes:t,setAttributes:l,allowDefaultImage:!0,additionalImageSizes:F("masonry_image_sizes",!1)}),wp.element.createElement(y.SelectControl,{label:(0,e.__)("Image Action","qi-blocks"),options:[{value:"",label:(0,e.__)("No Action","qi-blocks")},{value:"custom-link",label:(0,e.__)("Custom Link","qi-blocks")},{value:"home-link",label:(0,e.__)("Set Site Home Link","qi-blocks")}],value:t.imageAction,onChange:e=>{l({imageAction:e})}}),"inline"!==t.blockWidth&&wp.element.createElement(_l,{blockAttributes:t,setAttributes:l}),"custom-link"===t.imageAction&&wp.element.createElement(sl,{label:(0,e.__)("Custom Link","qi-blocks"),blockAttributes:t,setAttributes:l}),""===t.imageAction&&wp.element.createElement(A,{label:(0,e.__)("Enable Lightbox Popup","qi-blocks"),blockAttributeKey:"enablePopup",blockAttributes:t,setAttributes:l}),wp.element.createElement(y.SelectControl,{label:(0,e.__)("Image Hover","qi-blocks"),value:s,options:[{value:"",label:(0,e.__)("None","qi-blocks")},{value:"zoom",label:(0,e.__)("Zoom","qi-blocks")},{value:"zoom-out",label:(0,e.__)("Zoom Out","qi-blocks")},{value:"move",label:(0,e.__)("Move","qi-blocks")}],onChange:e=>l({imageHover:e})}),["zoom","zoom-out"].includes(s)&&wp.element.createElement(y.SelectControl,{label:(0,e.__)("Image Hover Zoom Origin","qi-blocks"),value:c,options:[{value:"",label:(0,e.__)("Center","qi-blocks")},{value:"top",label:(0,e.__)("Top","qi-blocks")},{value:"bottom",label:(0,e.__)("Bottom","qi-blocks")},{value:"left",label:(0,e.__)("Left","qi-blocks")},{value:"right",label:(0,e.__)("Right","qi-blocks")}],onChange:e=>l({imageZoomOrigin:e})})),"style"===a.name&&wp.element.createElement(y.BaseControl,{className:"qodef-base-control-container"},wp.element.createElement(Gt,{label:(0,e.__)("Width","qi-blocks"),blockAttributeKey:"imageWidth",setAttributes:l,blockAttributes:t,rangeMax:1e3,rangeDecimalMax:100,rangeDecimalMin:1,rangeDecimalStep:1,unitType:"pxPercentVw",allowScreens:!0}),wp.element.createElement(Gt,{label:(0,e.__)("Max Width","qi-blocks"),blockAttributeKey:"imageMaxWidth",setAttributes:l,blockAttributes:t,rangeMax:1e3,rangeDecimalMax:100,rangeDecimalMin:1,rangeDecimalStep:1,unitType:"pxPercentVw",allowScreens:!0}),wp.element.createElement(Gt,{label:(0,e.__)("Height","qi-blocks"),blockAttributeKey:"imageHeight",setAttributes:l,blockAttributes:t,rangeMax:1e3,rangeDecimalMax:100,rangeDecimalMin:1,rangeDecimalStep:1,unitType:"height",allowScreens:!0}),wp.element.createElement(y.TabPanel,{className:"qodef-tab-panel qodef--inner",tabs:[{name:"normal",title:(0,e.__)("Normal","qi-blocks")},{name:"hover",title:(0,e.__)("Hover","qi-blocks")}]},a=>wp.element.createElement(y.Card,{size:"small"},wp.element.createElement(y.CardBody,null,"normal"===a.name&&wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(Gt,{label:(0,e.__)("Opacity","qi-blocks"),blockAttributeKey:"imageOpacity",setAttributes:l,blockAttributes:t,rangeDecimalMax:1,rangeDecimalMin:0,rangeDecimalStep:.1,optionType:"decimal",allowUnits:!1})),"hover"===a.name&&wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(Gt,{label:(0,e.__)("Opacity","qi-blocks"),blockAttributeKey:"imageHoverOpacity",setAttributes:l,blockAttributes:t,rangeDecimalMax:1,rangeDecimalMin:0,rangeDecimalStep:.1,optionType:"decimal",allowUnits:!1}),wp.element.createElement(Gt,{label:(0,e.__)("Transition Duration (s)","qi-blocks"),blockAttributeKey:"transitionDuration",setAttributes:l,blockAttributes:t,rangeDecimalMax:4,rangeDecimalMin:0,rangeDecimalStep:.1,optionType:"decimal",allowUnits:!1}))))),wp.element.createElement(Jt,{blockAttributes:t,setAttributes:l,attrNameTemplate:"Image"})),"advanced"===a.name&&wp.element.createElement(ll,{blockAttributes:t,setAttributes:l})))),wp.element.createElement("style",null,D(O(S,a),!1)&&`.${n} .qi-block-single-image img,\n\t\t\t\t\t\t .${n} .qi-block-single-image svg {\n\t\t\t\t\t\t\t${D(O(S,a),!1)}\n\t\t\t\t\t\t}`,D(O(E,a),!1)&&`.${n} .qi-block-single-image:hover img,\n\t\t\t\t\t\t .${n} .qi-block-single-image:hover svg {\n\t\t\t\t\t\t\t${D(O(E,a),!1)}\n\t\t\t\t\t\t}`),wp.element.createElement("div",m,wp.element.createElement("div",{className:b,style:O(d,a)},r&&r.url&&(()=>{const e=cl(t,"");let l="";return r&&r.url&&(l=`<img src="${r.url}" alt="${r.alt}"/>`,r.html&&(l=r.html)),"home-link"===t.imageAction?wp.element.createElement("div",{className:"qodef-m-image"},wp.element.createElement("a",{href:qiBlocksEditor.vars.siteURL,dangerouslySetInnerHTML:{__html:l}})):""===t.imageAction&&o?wp.element.createElement("div",{className:"qodef-m-image"},wp.element.createElement("a",{className:"qodef-popup-item",href:r?.url,"data-type":"image","data-fslightbox":i,dangerouslySetInnerHTML:{__html:l}})):"custom-link"===t.imageAction&&z(t.link)?wp.element.createElement("div",{className:"qodef-m-image"},wp.element.createElement("a",$l({},e,{dangerouslySetInnerHTML:{__html:l}}))):wp.element.createElement("div",{className:"qodef-m-image",dangerouslySetInnerHTML:{__html:l}})})())))}}Wl.defaultProps={previewScreen:h};const Yl=(0,he.compose)(Gl,Dl)(Wl);function Zl(){return Zl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var l=arguments[t];for(var a in l)({}).hasOwnProperty.call(l,a)&&(e[a]=l[a])}return e},Zl.apply(null,arguments)}class Xl extends ke.Component{render(){const{attributes:e}=this.props,{image:t,enablePopup:l,galleryData:a,imageHover:n,imageZoomOrigin:r}=e;const o=C(e),i={className:I(e),...x(e)};o&&(i.id=o);const s=ve()(T("single-image",this.props),{"qi-block-fslightbox-popup qodef-popup-gallery":l,[`qodef-hover--${n}`]:n,[`qodef-hover-from--${r}`]:["zoom","zoom-out"].includes(n)&&r});return wp.element.createElement("div",i,wp.element.createElement("div",{className:s},t&&t.url&&(()=>{const r=cl(e,"");let o="";if(t&&t.url){o=`<img class="${t.id?`wp-image-${t.id}`:""}" ${n?'loading="eager"':""} src="${t.url}" alt="${t.alt}"/>`,t.html&&(o=t.html)}return"home-link"===e.imageAction?wp.element.createElement("div",{className:"qodef-m-image"},wp.element.createElement("a",{href:qiBlocksEditor.vars.siteURL,dangerouslySetInnerHTML:{__html:o}})):""===e.imageAction&&l?wp.element.createElement("div",{className:"qodef-m-image"},wp.element.createElement("a",{className:"qodef-popup-item",href:t?.url,"data-type":"image","data-fslightbox":a,dangerouslySetInnerHTML:{__html:o}})):"custom-link"===e.imageAction&&z(e.link)?wp.element.createElement("div",{className:"qodef-m-image"},wp.element.createElement("a",Zl({},r,{dangerouslySetInnerHTML:{__html:o}}))):wp.element.createElement("div",{className:"qodef-m-image",dangerouslySetInnerHTML:{__html:o}})})()))}}const Jl=Xl,Ql={attributes:{image:{id:null,url:qiBlocksEditor.vars.defaultImage,alt:qiBlocksEditor.vars.defaultImagePlaceholder}}};var ea,ta;function la(){return la=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var l=arguments[t];for(var a in l)({}).hasOwnProperty.call(l,a)&&(e[a]=l[a])}return e},la.apply(null,arguments)}const aa=e=>s.createElement("svg",la({xmlns:"http://www.w3.org/2000/svg",xmlSpace:"preserve",width:24,height:24},e),ea||(ea=s.createElement("path",{fill:"none",stroke:"#EE2852",strokeMiterlimit:10,d:"M.5 3.578h23v17H.5z"})),ta||(ta=s.createElement("path",{fill:"#EE2852",d:"M16.614 8H7.281v8h9.333zm-7.999 7.335h-.667v-2.668l2-2.001 3.334 2.667 2.665-1.999v4.001H8.615m4.679-6.377q.384 0 .654.281.272.282.271.655c-.001.373-.09.468-.271.654a.87.87 0 0 1-.654.282.87.87 0 0 1-.657-.282q-.271-.28-.271-.654v-.375l.271-.28a.88.88 0 0 1 .657-.281"})));(0,t.registerBlockType)("qi-blocks/single-image",{icon:wp.element.createElement(aa,null),title:(0,e.__)("Single Image","qi-blocks"),description:(0,e.__)("Create easily configurable individual image displays on your website pages.","qi-blocks"),category:"qi-blocks",keywords:[(0,e.__)("image","qi-blocks"),(0,e.__)("showcase","qi-blocks"),(0,e.__)("lightbox popup","qi-blocks"),(0,e.__)("image hover","qi-blocks"),(0,e.__)("qi","qi-blocks")],attributes:be,example:Ql,edit:Yl,save:Jl})})()})();